@autobest-ui/scripts 1.3.2 → 1.4.0
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.
- package/common/webpack.common.js +11 -0
- package/package.json +2 -2
package/common/webpack.common.js
CHANGED
|
@@ -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
|
+
"version": "1.4.0",
|
|
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": "
|
|
95
|
+
"gitHead": "fb75bd54150164e95c075eef437badba8dcd0728"
|
|
96
96
|
}
|