@mpxjs/webpack-plugin 2.8.28-beta.8 → 2.8.28-beta.9
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 +20 -15
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -520,8 +520,8 @@ class MpxWebpackPlugin {
|
|
|
520
520
|
})
|
|
521
521
|
|
|
522
522
|
compiler.hooks.thisCompilation.tap('MpxWebpackPlugin', (compilation, { normalModuleFactory }) => {
|
|
523
|
-
compilation.warnings
|
|
524
|
-
compilation.errors
|
|
523
|
+
compilation.warnings.push(...warnings)
|
|
524
|
+
compilation.errors.push(...errors)
|
|
525
525
|
const moduleGraph = compilation.moduleGraph
|
|
526
526
|
|
|
527
527
|
if (!compilation.__mpx__) {
|
|
@@ -771,10 +771,14 @@ class MpxWebpackPlugin {
|
|
|
771
771
|
const rawProcessModuleDependencies = compilation.processModuleDependencies
|
|
772
772
|
compilation.processModuleDependencies = (module, callback) => {
|
|
773
773
|
const presentationalDependencies = module.presentationalDependencies || []
|
|
774
|
+
const errors = []
|
|
774
775
|
async.forEach(presentationalDependencies.filter((dep) => dep.mpxAction), (dep, callback) => {
|
|
775
|
-
dep.mpxAction(module, compilation,
|
|
776
|
-
|
|
777
|
-
|
|
776
|
+
dep.mpxAction(module, compilation, (err) => {
|
|
777
|
+
if (err) errors.push(err)
|
|
778
|
+
callback()
|
|
779
|
+
})
|
|
780
|
+
}, () => {
|
|
781
|
+
compilation.errors.push(...errors)
|
|
778
782
|
rawProcessModuleDependencies.call(compilation, module, callback)
|
|
779
783
|
})
|
|
780
784
|
}
|
|
@@ -860,16 +864,17 @@ class MpxWebpackPlugin {
|
|
|
860
864
|
}
|
|
861
865
|
|
|
862
866
|
// hack process https://github.com/webpack/webpack/issues/16045
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
867
|
+
// no need anymore
|
|
868
|
+
// const _handleModuleBuildAndDependenciesRaw = compilation._handleModuleBuildAndDependencies
|
|
869
|
+
//
|
|
870
|
+
// compilation._handleModuleBuildAndDependencies = (originModule, module, recursive, callback) => {
|
|
871
|
+
// const rawCallback = callback
|
|
872
|
+
// callback = (err) => {
|
|
873
|
+
// if (err) return rawCallback(err)
|
|
874
|
+
// return rawCallback(null, module)
|
|
875
|
+
// }
|
|
876
|
+
// return _handleModuleBuildAndDependenciesRaw.call(compilation, originModule, module, recursive, callback)
|
|
877
|
+
// }
|
|
873
878
|
|
|
874
879
|
const rawEmitAsset = compilation.emitAsset
|
|
875
880
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/webpack-plugin",
|
|
3
|
-
"version": "2.8.28-beta.
|
|
3
|
+
"version": "2.8.28-beta.9",
|
|
4
4
|
"description": "mpx compile core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mpx"
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"engines": {
|
|
83
83
|
"node": ">=14.14.0"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "ec2c3c67a3ef40485941c30bbb260138602d01a1"
|
|
86
86
|
}
|