@zohodesk/client_build_tool 0.0.16-exp.4 → 0.0.16-exp.6

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.
@@ -13,6 +13,7 @@ class ChunkHierarchyPlugin {
13
13
  apply(compiler) {
14
14
  compiler.hooks.emit.tapAsync('ChunkHierarchyPlugin', (compilation, callback) => {
15
15
  const result = {};
16
+ const rootContext = path.resolve(compiler.context, '..', '..');
16
17
 
17
18
  for (const chunk of compilation.chunks) {
18
19
  const chunkName = chunk.name || chunk.id;
@@ -20,7 +21,7 @@ class ChunkHierarchyPlugin {
20
21
 
21
22
  for (const module of compilation.chunkGraph.getChunkModulesIterable(chunk)) {
22
23
  // Recursively extract real modules (handle ConcatenatedModules)
23
- collectModules(module, modules, compiler.context);
24
+ collectModules(module, modules, rootContext);
24
25
  }
25
26
 
26
27
  result[chunkName] = modules;
@@ -42,6 +43,7 @@ class ChunkHierarchyPlugin {
42
43
  function collectModules(module, modules, context) {
43
44
  // Handle normal modules
44
45
  if (module.resource) {
46
+ console.log(module.resource);
45
47
  modules.push(path.relative(context, module.resource));
46
48
  return;
47
49
  } // Handle ConcatenatedModule (webpack internal)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/client_build_tool",
3
- "version": "0.0.16-exp.4",
3
+ "version": "0.0.16-exp.6",
4
4
  "description": "A CLI tool to build web applications and client libraries",
5
5
  "main": "lib/index.js",
6
6
  "bin": {