@zohodesk/client_build_tool 0.0.15-exp.11 → 0.0.15-exp.13
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.
|
@@ -21,13 +21,7 @@ class ChunkHierarchyPlugin {
|
|
|
21
21
|
|
|
22
22
|
for (const chunk of compilation.chunks) {
|
|
23
23
|
// skip unnamed or runtime chunks
|
|
24
|
-
if (
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
;
|
|
29
|
-
|
|
30
|
-
if (chunk.name.includes("runtime")) {
|
|
24
|
+
if (chunk.name && chunk.name.includes("runtime")) {
|
|
31
25
|
continue;
|
|
32
26
|
}
|
|
33
27
|
|
|
@@ -37,13 +31,33 @@ class ChunkHierarchyPlugin {
|
|
|
37
31
|
|
|
38
32
|
for (const module of modules) {
|
|
39
33
|
for (const conn of moduleGraph.getOutgoingConnections(module)) {
|
|
40
|
-
if (conn.module
|
|
41
|
-
|
|
34
|
+
if (!conn.module) continue;
|
|
35
|
+
const mod = conn.module;
|
|
36
|
+
|
|
37
|
+
const ConcatenatedModule = require("webpack/lib/optimize/ConcatenatedModule");
|
|
38
|
+
|
|
39
|
+
if (mod instanceof ConcatenatedModule) {
|
|
40
|
+
for (const inner of mod.modules) {
|
|
41
|
+
if (inner.resource) {
|
|
42
|
+
const match = inner.resource.match(/(?<!node_modules\/)jsapps\/.*/);
|
|
43
|
+
|
|
44
|
+
if (match && /^(?!.*node_modules).*$/.test(match)) {
|
|
45
|
+
deps.add(match[0]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
const identifier = mod.resource || mod.identifier();
|
|
51
|
+
const match = identifier && identifier.match(/(?<!node_modules\/)jsapps\/.*/);
|
|
52
|
+
|
|
53
|
+
if (match && /^(?!.*node_modules).*$/.test(match)) {
|
|
54
|
+
deps.add(match[0]);
|
|
55
|
+
}
|
|
42
56
|
}
|
|
43
57
|
}
|
|
44
58
|
}
|
|
45
59
|
|
|
46
|
-
hierarchy[chunk.name] = Array.from(deps);
|
|
60
|
+
hierarchy[chunk.name || chunk.id] = Array.from(deps);
|
|
47
61
|
}
|
|
48
62
|
|
|
49
63
|
const outputPath = compiler.options.output.path;
|
|
@@ -36,6 +36,10 @@ class InjectChunkGraphPlugin {
|
|
|
36
36
|
const newSource = originalSource.replace('__PRELOAD_CHUNK_GRAPH__', `${JSON.stringify(chunkGraph)}`); // Update the runtime asset with injected code
|
|
37
37
|
|
|
38
38
|
compilation.updateAsset(runtimeChunkName, new RawSource(newSource));
|
|
39
|
+
|
|
40
|
+
if (runtimeChunkName.includes('smap/')) {
|
|
41
|
+
compilation.updateAsset(runtimeChunkName.replace('smap/', ''), new RawSource(newSource));
|
|
42
|
+
}
|
|
39
43
|
});
|
|
40
44
|
});
|
|
41
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/client_build_tool",
|
|
3
|
-
"version": "0.0.15-exp.
|
|
3
|
+
"version": "0.0.15-exp.13",
|
|
4
4
|
"description": "A CLI tool to build web applications and client libraries",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"test": "react-cli test"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
|
-
"type": "git",
|
|
20
|
+
"type": "git",
|
|
21
21
|
"url": "https://zgit.csecz.zohocorpin.com/zohodesk/react-cli.git"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|