@zohodesk/client_build_tool 0.0.12-exp.6 → 0.0.12-exp.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.
|
@@ -72,8 +72,7 @@ class CdnChangePlugin {
|
|
|
72
72
|
const {
|
|
73
73
|
createSeparateSMap,
|
|
74
74
|
mode
|
|
75
|
-
} = this;
|
|
76
|
-
console.log(data.assets, 'jd'); // eslint-disable-next-line no-param-reassign
|
|
75
|
+
} = this; // eslint-disable-next-line no-param-reassign
|
|
77
76
|
|
|
78
77
|
data.assets = { ...data.assets,
|
|
79
78
|
css: data.assets.css.map(css => `${this.cssTemplate}${css}`),
|
|
@@ -56,18 +56,15 @@ class MurphyInjectorPlugin {
|
|
|
56
56
|
const childChunks = childCompilation.chunks;
|
|
57
57
|
|
|
58
58
|
_htmlWebpackPlugin.default.getHooks(compilation).alterAssetTags.tapAsync(pluginName, (data, cb) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
contentHashType: "javascript"
|
|
66
|
-
}); // ✅ Use Webpack's getPath to resolve your template properly
|
|
67
|
-
});
|
|
59
|
+
let fileName = '';
|
|
60
|
+
const childFiles = childCompilation.entrypoints.get(name).getFiles();
|
|
61
|
+
|
|
62
|
+
if (childFiles.length !== 1) {
|
|
63
|
+
compilation.errors.push(new Error(`${pluginName}: Expected exactly 1 child file for entry "${name}", but got ${childFiles.length}.`));
|
|
64
|
+
}
|
|
68
65
|
|
|
69
66
|
if (this.cdnMapping.isCdnEnabled) {
|
|
70
|
-
fileName =
|
|
67
|
+
fileName = childFiles[0];
|
|
71
68
|
}
|
|
72
69
|
|
|
73
70
|
;
|