webpack 3.5.4 → 3.5.5

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/Module.js CHANGED
@@ -73,6 +73,7 @@ class Module extends DependenciesBlock {
73
73
 
74
74
  setChunks(chunks) {
75
75
  this._chunks = new SortableSet(chunks, sortById);
76
+ this._chunksDebugIdent = undefined;
76
77
  }
77
78
 
78
79
  addChunk(chunk) {
@@ -352,7 +352,6 @@ class ConcatenatedModule extends Module {
352
352
  internalNames: new Map(),
353
353
  exportMap: exportMap,
354
354
  reexportMap: reexportMap,
355
- needCompatibilityFlag: false,
356
355
  hasNamespaceObject: false,
357
356
  namespaceObjectSource: null
358
357
  };
@@ -576,7 +575,8 @@ class ConcatenatedModule extends Module {
576
575
  const result = new ConcatSource();
577
576
 
578
577
  // add harmony compatibility flag (must be first because of possible circular dependencies)
579
- if(moduleToInfoMap.get(this.rootModule).needCompatibilityFlag) {
578
+ const usedExports = this.rootModule.usedExports;
579
+ if(usedExports === true) {
580
580
  result.add(`Object.defineProperty(${this.exportsArgument || "exports"}, "__esModule", { value: true });\n`);
581
581
  }
582
582
 
@@ -807,9 +807,7 @@ class HarmonyCompatibilityDependencyConcatenatedTemplate {
807
807
  }
808
808
 
809
809
  apply(dep, source, outputOptions, requestShortener, dependencyTemplates) {
810
- if(dep.originModule === this.rootModule) {
811
- this.modulesMap.get(this.rootModule).needCompatibilityFlag = true;
812
- }
810
+ // do nothing
813
811
  }
814
812
  }
815
813
 
@@ -22,6 +22,7 @@ class EnsureChunkConditionsPlugin {
22
22
  chunk.parents.forEach((parent) => {
23
23
  if(!usedChunks.has(parent)) {
24
24
  parent.addModule(module);
25
+ module.addChunk(parent);
25
26
  newChunks.push(parent);
26
27
  }
27
28
  });
@@ -163,6 +163,7 @@ class ModuleConcatenationPlugin {
163
163
  }
164
164
  chunks.forEach(chunk => {
165
165
  chunk.addModule(newModule);
166
+ newModule.addChunk(chunk);
166
167
  if(chunk.entryModule === concatConfiguration.rootModule)
167
168
  chunk.entryModule = newModule;
168
169
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "3.5.4",
3
+ "version": "3.5.5",
4
4
  "author": "Tobias Koppers @sokra",
5
5
  "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
6
6
  "dependencies": {