Update to webpack 4
- Remove unused base64-loader
This commit is contained in:
11
package.json
11
package.json
@@ -26,12 +26,11 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.23.1",
|
"babel-core": "^6.23.1",
|
||||||
"babel-eslint": "^8.2.1",
|
"babel-eslint": "^8.2.1",
|
||||||
"babel-loader": "^7.1.2",
|
"babel-loader": "^7.1.4",
|
||||||
"babel-polyfill": "^6.22.0",
|
"babel-polyfill": "^6.22.0",
|
||||||
"babel-preset-es2015": "^6.22.0",
|
"babel-preset-es2015": "^6.22.0",
|
||||||
"base64-loader": "^1.0.0",
|
|
||||||
"chromeless": "^1.5.1",
|
"chromeless": "^1.5.1",
|
||||||
"copy-webpack-plugin": "^4.0.1",
|
"copy-webpack-plugin": "^4.5.1",
|
||||||
"docdash": "^0.4.0",
|
"docdash": "^0.4.0",
|
||||||
"eslint": "^4.6.1",
|
"eslint": "^4.6.1",
|
||||||
"eslint-config-scratch": "^5.0.0",
|
"eslint-config-scratch": "^5.0.0",
|
||||||
@@ -49,8 +48,10 @@
|
|||||||
"tap": "^11.0.0",
|
"tap": "^11.0.0",
|
||||||
"travis-after-all": "^1.4.4",
|
"travis-after-all": "^1.4.4",
|
||||||
"twgl.js": "4.4.0",
|
"twgl.js": "4.4.0",
|
||||||
"webpack": "^3.10.0",
|
"uglifyjs-webpack-plugin": "^1.2.5",
|
||||||
"webpack-dev-server": "^2.8.2",
|
"webpack": "^4.8.0",
|
||||||
|
"webpack-cli": "^2.0.15",
|
||||||
|
"webpack-dev-server": "^3.1.4",
|
||||||
"xml-escape": "1.1.0"
|
"xml-escape": "1.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||||
|
|
||||||
const base = {
|
const base = {
|
||||||
|
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
||||||
devServer: {
|
devServer: {
|
||||||
contentBase: false,
|
contentBase: false,
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
@@ -27,12 +28,14 @@ const base = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
plugins: process.env.NODE_ENV === 'production' ? [
|
optimization: {
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
minimizer: [
|
||||||
include: /\.min\.js$/,
|
new UglifyJsPlugin({
|
||||||
minimize: true
|
include: /\.min\.js$/
|
||||||
})
|
})
|
||||||
] : []
|
]
|
||||||
|
},
|
||||||
|
plugins: []
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
|
|||||||
Reference in New Issue
Block a user