|
@@ -38,12 +38,12 @@ export default defineConfig({
|
|
|
targets: {
|
|
targets: {
|
|
|
ie: 11
|
|
ie: 11
|
|
|
},
|
|
},
|
|
|
- terserOptions: {
|
|
|
|
|
- compress: {
|
|
|
|
|
- drop_console: REACT_APP_ENV === 'prod' ? true : false,
|
|
|
|
|
- drop_debugger: REACT_APP_ENV === 'prod' ? true : false
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // terserOptions: {
|
|
|
|
|
+ // compress: {
|
|
|
|
|
+ // drop_console: NODE_ENV === 'production' ? true : false,
|
|
|
|
|
+ // drop_debugger: NODE_ENV === 'production' ? true : false
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
// umi routes: https://umijs.org/docs/routing
|
|
// umi routes: https://umijs.org/docs/routing
|
|
|
routes,
|
|
routes,
|
|
|
// Theme for antd: https://ant.design/docs/react/customize-theme-cn
|
|
// Theme for antd: https://ant.design/docs/react/customize-theme-cn
|
|
@@ -78,7 +78,7 @@ export default defineConfig({
|
|
|
config.plugin('windicss').use(windicss)
|
|
config.plugin('windicss').use(windicss)
|
|
|
config.plugin('antd-dayjs-webpack-plugin').use(AntdDayjsWebpackPlugin)
|
|
config.plugin('antd-dayjs-webpack-plugin').use(AntdDayjsWebpackPlugin)
|
|
|
|
|
|
|
|
- if (REACT_APP_ENV === 'prod') {
|
|
|
|
|
|
|
+ if (NODE_ENV === 'production') {
|
|
|
config.merge({
|
|
config.merge({
|
|
|
optimization: {
|
|
optimization: {
|
|
|
minimize: true,
|
|
minimize: true,
|