@autobest-ui/scripts 1.3.1 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -133,7 +133,7 @@ module.exports = (appConfig, extendEnv, { isProd, isServer, isHotServer }) => {
133
133
  [
134
134
  require('@babel/preset-env').default,
135
135
  {
136
- useBuiltIns: 'entry',
136
+ useBuiltIns: 'usage',
137
137
  corejs: 3,
138
138
  exclude: ['transform-typeof-symbol']
139
139
  }
@@ -233,6 +233,17 @@ module.exports = (appConfig, extendEnv, { isProd, isServer, isHotServer }) => {
233
233
  })
234
234
  ]
235
235
  };
236
+
237
+ if (isProd) {
238
+ // build下, 忽略locale moment, 缩小代码体积
239
+ result.plugins.push(
240
+ new webpack.IgnorePlugin({
241
+ resourceRegExp: /^\.\/locale$/,
242
+ contextRegExp: /moment$/
243
+ })
244
+ );
245
+ }
246
+
236
247
  if (isProd && !isServer) {
237
248
  result.optimization = {
238
249
  chunkIds: 'named',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobest-ui/scripts",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "private": false,
5
5
  "description": "utils for project tools",
6
6
  "bin": {
@@ -92,5 +92,5 @@
92
92
  "webpack-merge": "5.8.0",
93
93
  "webpack-node-externals": "3.0.0"
94
94
  },
95
- "gitHead": "9043135be066954d952dac512ef2e5aabc1a7512"
95
+ "gitHead": "45101527dfcd077c62a92a79d32aafb6fc6808fa"
96
96
  }
@@ -52,7 +52,7 @@ module.exports = function (appConfig, extendEnv) {
52
52
  ],
53
53
  splitChunks: {
54
54
  chunks: 'async',
55
- minSize: 0,
55
+ minSize: 10000,
56
56
  minRemainingSize: 0,
57
57
  minChunks: 1,
58
58
  // 按需加载时的最大并行请求数。
@@ -71,7 +71,6 @@ module.exports = function (appConfig, extendEnv) {
71
71
  default: {
72
72
  minChunks: 3,
73
73
  priority: -20,
74
- name: '_app_',
75
74
  reuseExistingChunk: true
76
75
  }
77
76
  }