Commit 44d9e056 by 阳浪

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	build/webpack.base.config copy.js
#	build/webpack.base.config.js
#	src/locales/newWord.json
#	src/locales/zh-CN.json
parents e53e4a7f a87b85a5
{
"presets": [
[
"@babel/preset-env",
{
"targets":{
"browsers":["last 2 versions"]
},
// "debug":true
}
],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-syntax-dynamic-import",
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }],
["import", { "libraryName": "antd", "libraryDirectory": "es" }],
"react-hot-loader/babel",
"@babel/plugin-transform-runtime"
]
}
{
"parser": "babel-eslint",
"plugins": [
"react",
"jsx-a11y"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"semi": 2
}
}
......@@ -53,7 +53,7 @@ module.exports = {
}
},
plugins: [
new HtmlWebpackPlugin(generateHtml("index", "未木云智慧党建")),
new HtmlWebpackPlugin(generateHtml("index", "机电e先锋智慧党建平台")),
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV),
routerMode: JSON.stringify("hash")
......
......@@ -50,7 +50,7 @@ module.exports = {
}
},
plugins: [
new HtmlWebpackPlugin(generateHtml("index", "未木云智慧党建")),
new HtmlWebpackPlugin(generateHtml("index", "机电e先锋智慧党建平台")),
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV),
routerMode: JSON.stringify("hash")
......
......@@ -8,7 +8,7 @@ const TerserPlugin = require("terser-webpack-plugin");
const common = require("./webpack.base.config.js");
const ProgressBarPlugin = require("progress-bar-webpack-plugin");
module.exports = merge(common, {
mode: "production",
mode: "production",
module: {
rules: [{
enforce: "pre",
......@@ -56,30 +56,30 @@ module.exports = merge(common, {
]
},
performance: {
hints: "warning",
maxAssetSize: 30000000,
maxEntrypointSize: 50000000,
assetFilter: function(assetFilename) {
return assetFilename.endsWith(".css") || assetFilename.endsWith(".js");
},
hints: "warning",
maxAssetSize: 30000000,
maxEntrypointSize: 50000000,
assetFilter: function(assetFilename) {
return assetFilename.endsWith(".css") || assetFilename.endsWith(".js");
},
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
sourceMap: true, // Must be set to true if using source-maps in production
terserOptions: {
output: {
},
parallel: true,
cache: true,
drop_console: true,
drop_debugger: false,
pure_funcs: ['console.log','Warning','warnings','debugger'], // 移除console
}
})
new TerserPlugin({
sourceMap: true, // Must be set to true if using source-maps in production
terserOptions: {
output: {
},
parallel: true,
cache: true,
drop_console: true,
drop_debugger: false,
pure_funcs: ['console.log','Warning','warnings','debugger'], // 移除console
}
})
]
}
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment