mirror of
https://github.com/Safe-Support-Chat/ocrcc-chatbox
synced 2024-12-25 02:21:52 +00:00
commit
678a0baa6e
@ -56,11 +56,11 @@ $ npm run build
|
||||
- [x] Minified
|
||||
- [x] Add greenkeeper
|
||||
- [x] Bookmarklet
|
||||
- [ ] Reset / Cleanslate / No-conflicts of styles
|
||||
- [ ] Obfuscation
|
||||
- [ ] Integrate eslint with webpack
|
||||
- [x] Reset / Cleanslate / No-conflicts of styles
|
||||
- [x] Obfuscation
|
||||
- [ ] Theming support
|
||||
- [ ] Storyboard and docs
|
||||
- [ ] Integrate eslint with webpack
|
||||
|
||||
## Background
|
||||
|
||||
|
392
package-lock.json
generated
392
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
||||
"description": "building an embeddable js widget with react",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "webpack-cli --mode production",
|
||||
"build": "NODE_ENV=production webpack-cli --mode production",
|
||||
"start": "webpack-serve --config ./webpack.config.js --mode development --open",
|
||||
"test": "jest",
|
||||
"test-update-snapshots": "jest --updateSnapshot",
|
||||
@ -76,6 +76,7 @@
|
||||
"style-loader": "^0.21.0",
|
||||
"webpack": "^4.8.3",
|
||||
"webpack-cli": "^3.0.1",
|
||||
"webpack-obfuscator": "^0.16.0",
|
||||
"webpack-serve": "^1.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,7 @@
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
||||
const increaseSpecificity = require('postcss-increase-specificity');
|
||||
const JavaScriptObfuscator = require('webpack-obfuscator');
|
||||
|
||||
const devMode = process.env.NODE_ENV !== 'production';
|
||||
|
||||
@ -14,7 +15,8 @@ const defaultConfig = {
|
||||
filename: devMode ? '[name].css' : '[name].[hash].css',
|
||||
chunkFilename: devMode ? '[id].css' : '[id].[hash].css',
|
||||
}),
|
||||
],
|
||||
devMode ? null : new JavaScriptObfuscator(),
|
||||
].filter(i => i),
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
@ -26,7 +28,8 @@ const defaultConfig = {
|
||||
test: /\.(scss|css)$/,
|
||||
use: [
|
||||
// fallback to style-loader in development
|
||||
devMode ? 'style-loader' : MiniCssExtractPlugin.loader,
|
||||
// devMode ? 'style-loader' : MiniCssExtractPlugin.loader,
|
||||
'style-loader',
|
||||
'css-loader',
|
||||
'cssimportant-loader',
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user