webpack 3.11.0 → 3.12.0

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.
@@ -32,6 +32,12 @@ function byId(a, b) {
32
32
  return 0;
33
33
  }
34
34
 
35
+ function byIndex(a, b) {
36
+ if(a.index < b.index) return -1;
37
+ if(a.index > b.index) return 1;
38
+ return 0;
39
+ }
40
+
35
41
  function iterationBlockVariable(variables, fn) {
36
42
  for(let indexVariable = 0; indexVariable < variables.length; indexVariable++) {
37
43
  const varDep = variables[indexVariable].dependencies;
@@ -682,7 +688,7 @@ class Compilation extends Tapable {
682
688
  }
683
689
 
684
690
  sortModules(modules) {
685
- modules.sort(byId);
691
+ modules.sort(byIndex);
686
692
  }
687
693
 
688
694
  reportDependencyErrorsAndWarnings(module, blocks) {
@@ -215,10 +215,13 @@ module.exports = class HotModuleReplacementPlugin {
215
215
  this.state.module.addDependency(dep);
216
216
  requests.push(request);
217
217
  });
218
- if(expr.arguments.length > 1)
218
+ if(expr.arguments.length > 1) {
219
219
  this.applyPluginsBailResult("hot accept callback", expr.arguments[1], requests);
220
- else
220
+ parser.walkExpression(expr.arguments[1]); // other args are ignored
221
+ } else {
221
222
  this.applyPluginsBailResult("hot accept without callback", expr, requests);
223
+ }
224
+ return true;
222
225
  }
223
226
  }
224
227
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
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": {