@mpxjs/webpack-plugin 2.7.1-beta.5 → 2.7.1-beta.7
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/index.js +5 -3
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -488,7 +488,9 @@ class MpxWebpackPlugin {
|
|
|
488
488
|
// 记录entryModule与entryNode的对应关系,用于体积分析
|
|
489
489
|
entryNodeModulesMap: new Map(),
|
|
490
490
|
// 记录与asset相关联的modules,用于体积分析
|
|
491
|
-
|
|
491
|
+
assetsModulesMap: new Map(),
|
|
492
|
+
// 记录与asset相关联的ast,用于体积分析和esCheck,避免重复parse
|
|
493
|
+
assetsASTsMap: new Map(),
|
|
492
494
|
usingComponents: {},
|
|
493
495
|
// todo es6 map读写性能高于object,之后会逐步替换
|
|
494
496
|
vueContentCache: new Map(),
|
|
@@ -807,9 +809,9 @@ class MpxWebpackPlugin {
|
|
|
807
809
|
})
|
|
808
810
|
|
|
809
811
|
compilation.hooks.moduleAsset.tap('MpxWebpackPlugin', (module, filename) => {
|
|
810
|
-
const modules = mpx.
|
|
812
|
+
const modules = mpx.assetsModulesMap.get(filename) || new Set()
|
|
811
813
|
modules.add(module)
|
|
812
|
-
mpx.
|
|
814
|
+
mpx.assetsModulesMap.set(filename, modules)
|
|
813
815
|
})
|
|
814
816
|
|
|
815
817
|
compilation.hooks.beforeModuleAssets.tap('MpxWebpackPlugin', () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/webpack-plugin",
|
|
3
|
-
"version": "2.7.1-beta.
|
|
3
|
+
"version": "2.7.1-beta.7",
|
|
4
4
|
"description": "mpx compile core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mpx"
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"engines": {
|
|
81
81
|
"node": ">=14.14.0"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "f626eb6d103d6d9685e1743500f87db46412df42"
|
|
84
84
|
}
|