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 = { ...@@ -53,7 +53,7 @@ module.exports = {
} }
}, },
plugins: [ plugins: [
new HtmlWebpackPlugin(generateHtml("index", "未木云智慧党建")), new HtmlWebpackPlugin(generateHtml("index", "机电e先锋智慧党建平台")),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV), "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV),
routerMode: JSON.stringify("hash") routerMode: JSON.stringify("hash")
......
...@@ -50,7 +50,7 @@ module.exports = { ...@@ -50,7 +50,7 @@ module.exports = {
} }
}, },
plugins: [ plugins: [
new HtmlWebpackPlugin(generateHtml("index", "未木云智慧党建")), new HtmlWebpackPlugin(generateHtml("index", "机电e先锋智慧党建平台")),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV), "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV),
routerMode: JSON.stringify("hash") routerMode: JSON.stringify("hash")
......
...@@ -8,7 +8,7 @@ const TerserPlugin = require("terser-webpack-plugin"); ...@@ -8,7 +8,7 @@ const TerserPlugin = require("terser-webpack-plugin");
const common = require("./webpack.base.config.js"); const common = require("./webpack.base.config.js");
const ProgressBarPlugin = require("progress-bar-webpack-plugin"); const ProgressBarPlugin = require("progress-bar-webpack-plugin");
module.exports = merge(common, { module.exports = merge(common, {
mode: "production", mode: "production",
module: { module: {
rules: [{ rules: [{
enforce: "pre", enforce: "pre",
...@@ -56,30 +56,30 @@ module.exports = merge(common, { ...@@ -56,30 +56,30 @@ module.exports = merge(common, {
] ]
}, },
performance: { performance: {
hints: "warning", hints: "warning",
maxAssetSize: 30000000, maxAssetSize: 30000000,
maxEntrypointSize: 50000000, maxEntrypointSize: 50000000,
assetFilter: function(assetFilename) { assetFilter: function(assetFilename) {
return assetFilename.endsWith(".css") || assetFilename.endsWith(".js"); return assetFilename.endsWith(".css") || assetFilename.endsWith(".js");
}, },
}, },
optimization: { optimization: {
minimize: true, minimize: true,
minimizer: [ minimizer: [
new TerserPlugin({ new TerserPlugin({
sourceMap: true, // Must be set to true if using source-maps in production sourceMap: true, // Must be set to true if using source-maps in production
terserOptions: { terserOptions: {
output: { output: {
}, },
parallel: true, parallel: true,
cache: true, cache: true,
drop_console: true, drop_console: true,
drop_debugger: false, drop_debugger: false,
pure_funcs: ['console.log','Warning','warnings','debugger'], // 移除console 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