@umijs/bundler-webpack 3.5.25 → 3.5.28
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/lib/getConfig/getConfig.js +12 -4
- package/package.json +5 -5
|
@@ -392,18 +392,26 @@ function _getConfig() {
|
|
|
392
392
|
|
|
393
393
|
const copyPatterns = [(0, _fs().existsSync)((0, _path().join)(cwd, 'public')) && {
|
|
394
394
|
from: (0, _path().join)(cwd, 'public'),
|
|
395
|
-
|
|
395
|
+
info: {
|
|
396
|
+
minimized: true
|
|
397
|
+
}
|
|
396
398
|
}, ...(config.copy ? config.copy.map(item => {
|
|
397
399
|
if (typeof item === 'string') {
|
|
398
400
|
return {
|
|
399
401
|
from: (0, _path().join)(cwd, item),
|
|
400
|
-
to: absOutputPath
|
|
402
|
+
to: absOutputPath,
|
|
403
|
+
info: {
|
|
404
|
+
minimized: true
|
|
405
|
+
}
|
|
401
406
|
};
|
|
402
407
|
}
|
|
403
408
|
|
|
404
409
|
return {
|
|
405
410
|
from: (0, _path().join)(cwd, item.from),
|
|
406
|
-
to: (0, _path().join)(absOutputPath, item.to)
|
|
411
|
+
to: (0, _path().join)(absOutputPath, item.to),
|
|
412
|
+
info: {
|
|
413
|
+
minimized: true
|
|
414
|
+
}
|
|
407
415
|
};
|
|
408
416
|
}) : [])].filter(Boolean);
|
|
409
417
|
|
|
@@ -475,7 +483,7 @@ function _getConfig() {
|
|
|
475
483
|
} else if (!opts.__disableTerserForTest) {
|
|
476
484
|
webpackConfig.optimization.minimizer('terser').use(require.resolve('../webpack/plugins/terser-webpack-plugin'), [{
|
|
477
485
|
terserOptions: (0, _utils().deepmerge)(_terserOptions.default, config.terserOptions || {}),
|
|
478
|
-
sourceMap: config.devtool
|
|
486
|
+
sourceMap: Boolean(config.devtool),
|
|
479
487
|
cache: process.env.TERSER_CACHE !== 'none',
|
|
480
488
|
// 兼容内部流程系统,读到的 cpu 数并非真实的
|
|
481
489
|
// 使用 SIGMA_MAX_PROCESSORS_LIMIT 指定真核数
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-webpack",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.28",
|
|
4
4
|
"description": "@umijs/bundler-webpack",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"strip-ansi": "6.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@umijs/bundler-utils": "3.5.
|
|
41
|
-
"@umijs/deps": "3.5.
|
|
42
|
-
"@umijs/types": "3.5.
|
|
43
|
-
"@umijs/utils": "3.5.
|
|
40
|
+
"@umijs/bundler-utils": "3.5.28",
|
|
41
|
+
"@umijs/deps": "3.5.28",
|
|
42
|
+
"@umijs/types": "3.5.28",
|
|
43
|
+
"@umijs/utils": "3.5.28",
|
|
44
44
|
"jest-worker": "26.6.2",
|
|
45
45
|
"node-libs-browser": "2.2.1",
|
|
46
46
|
"normalize-url": "1.9.1",
|