Commit Graph

168 Commits

Author SHA1 Message Date
Tim Sebastian 5b4836d185 remove "lastId" as there is no usecase 2017-06-21 22:22:00 +10:00
Tobias Koppers 5d4ba56c5f Allow scope hoisting to process modules in multiple chunks 2017-06-14 22:46:26 +02:00
Tobias Koppers cc705ec609 avoid creating recursive chunk references
parent-child-dependencies are more optimized
2017-06-09 16:06:52 +02:00
Tobias Koppers 4a25a17bb6 improvements from review 2017-05-21 09:15:42 +02:00
Tobias Koppers 9b2a9fa786 Scope Hoisting 2017-05-21 09:15:41 +02:00
Tobias Koppers 2bd2d2844c improve a few issues
from review by @Kovensky
2017-05-20 14:54:42 +02:00
Tobias Koppers 8d3efe7d63 Merge branch 'next' into perf/modules-set 2017-05-16 14:37:03 +02:00
Tobias Koppers 101850c5a9 assign correct records and cache to child compilations
This is a breaking change because plugins or loader could rely on this incorrect behavior
When using child compilations plugins and loaders should use a unique compiler name or use a consistent order

fixes #2777
2017-05-04 13:05:03 +02:00
J Huang 94d0641ba4 perf: use Date.now() instead of +new Date()
+new Date() is 2x slower than Date.now(), see https://jsperf.com/new-date-vs-date-now-vs-performance-now/6
2017-05-04 10:19:10 +08:00
Tobias Koppers aac0389ba8 Sort by debug id and id 2017-04-19 08:26:59 +02:00
Tobias Koppers e8bc9c2b3b use a Set for Module.chunks 2017-04-18 23:27:25 +02:00
Tim Sebastian b863851ce9 add getStats again - remove breaking change 2017-04-06 21:52:06 +10:00
Tim Sebastian 8165164d3e explicitly call `new Stats` with compilation
instead of having compilation.getStats returning a new instance of `Stats(this)`
2017-04-06 21:40:58 +10:00
SendilKumar N 26456f96d4 Changing async to asyncLib 2017-04-05 21:05:00 +08:00
Jeff Escalante 5fab3cbe9c two small changes
- addEntry callback passes module
- debugId test starts from 1000
2017-03-30 18:10:41 -04:00
Ali BARIN a941499889 Update variable declarations according to ES6 2017-03-02 15:09:09 +01:00
Ryan Berdeen 6bd9c8a757 pass chunk to updateHashForChunk 2017-02-24 15:24:18 -05:00
Tobias Koppers fbf84d51f2 allow to apply plugins to child compiler
allow to match on compiler name in rules

#4177
2017-02-22 11:49:49 +01:00
Tim Sebastian 840efada4f inline cacheAssetsAndApplyPlugins helper as it heavily relies on "this" anyways 2017-02-05 13:28:15 +11:00
Tim Sebastian 36cea5944f further reduce usage of let in Compilation 2017-02-05 12:20:22 +11:00
Tim Sebastian 0bc09a8033 use const where applicable in Compilation 2017-02-05 10:13:17 +11:00
Tom910 665fbd0ca8 Fix todo comments 2017-01-25 22:47:11 +03:00
Tom910 74efa93d5f More refactoring Compilation.js and RemoveParentModulesPlugin.js 2017-01-25 22:39:24 +03:00
Tom910 588976d5e9 Deleting cache length size to loop 2017-01-24 22:39:38 +03:00
Tom910 b27f73710d Revert indents to Compilation 2017-01-23 22:31:53 +03:00
Tom910 609d473563 Refactoring and optimize Compilation.js 2017-01-23 21:52:20 +03:00
Tobias Koppers 330ca07fba Merge pull request #3874 from timse/salt-chunk-hash-instead-of-main-hash-in-loop
Salt chunk hash instead of main hash in loop
2017-01-11 09:18:44 +01:00
Tim Sebastian ef59336815 add comments to clarify why a sort is needed here. 2017-01-10 23:20:54 +11:00
Tim Sebastian 0284826a45 update chunkhash instead of main hash in chunk hashing loop 2017-01-10 09:45:59 +11:00
Tobias Koppers 9380bd4c12 Bugfix/disable module in harmony (#3755)
* moved format location into separate file
allow dependencies to report errors too

* NullDependencies do not change the hash

* dependencies can opt-out from `__webpack_require__` param

* apply module syntax plugins earlier

* emit errors if using AMD or CommonJS syntax in harmony modules
2017-01-09 10:11:34 -06:00
Tim Sebastian d45801a7f0 one crypto require should be enough 2017-01-10 00:55:44 +11:00
Tim Sebastian c3845c0731 remove unused/useless function sortItemsBeforeIds 2017-01-10 00:51:39 +11:00
Yuriy Ostapenko a87b61f526 Include child compilation hash into parent hash computation (#3744)
Without it, child compilations like those added by "extract-text-webpack-plugin" are not included in stats hash and aren't properly displayed on change.
2017-01-05 23:03:54 -06:00
Ahmed El Gabri 86169bd7eb refactor(ES6): upgrade Compilation to ES6 (#3767)
* refactor(ES6): upgrade Compilation to ES6

* refactor(ES6): upgrade methods

- constructor
- templatesPlugin
- addModule
- getModule
- findModule
- buildModule
- proccessModuleDependencies
- addModuleDependencies
- _addModuleChain
- addEntry

* refactor(ES6): upgrade methods

- prefetch
- rebuildModule
- finish
- unseal
- seal
- sortModules
- reportDependencyWarnings
- addChunk
- assignIndex
- assignDeep
- proccessDependenciesBlockForChunk
- removeChunkFromDependencies
- applyModuleIds
- applyChunkIds
- sortItesBeforeIds

* refactor(ES6): upgrade methods

- sortItemsWithModuleIds
- sortItemsWithChunkIds
- summarizeDependencies
- createHash
- modifyHash
- createModuleAssets
- getPath
- getStats
- createChildCompiler
- checkConstraints
2017-01-05 11:00:36 -06:00
wtgtybhertgeghgtwtg 11879537b9 Drop `ArrayMap` for `Map`. (#3718) 2017-01-03 23:49:58 -06:00
Sean Larkin aa8d01bf8d refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot (#3636)
* refactor(eslint): Added no-unsed-vars, env specific .eslintrc's for buildin & hot

* This change allows for buildin to now be part of the lint test by addition of an extra .eslintrc file which extends existing but sets es6 to false
* Turned on no-unused-vars for eslint, and then removed all warnings from turning that feature on
* Was getting notified of errors in "quote" property in eslintrc, so changed to correct value from error to 2.

* beautify

* swap invalid eslint config val
2016-12-30 09:43:49 -06:00
Tim Sebastian 678984b9e4 remove second param to `ChunkTemplate` constructor
the ChunkTemplate contructor only expects one parameter, therefore it seams unnecessary that `this.mainTemplate` is passed
2016-12-27 14:01:46 +11:00
Tobias Koppers 71cf49a259 add depth to module
add depth to stats
fix stats spacing (fixes #3541)
add maxModules to stats, default to 15 (fixes #3540)
2016-12-21 18:03:20 +01:00
Tobias Koppers 2817c3629d beautify 2016-12-14 16:22:55 +01:00
Tobias Koppers f4ab7fc7e2 more performance improvements 2016-12-14 16:22:54 +01:00
Tobias Koppers da29d21ae4 performance improvements
breaking change: Module has now a "unbuild" method that must work correctly
2016-12-14 16:22:16 +01:00
Sean Larkin c6850b3481 chore(performance): cleaned up unused variables, removed compilation from constructor, added stats additional messages 2016-12-07 17:22:20 +01:00
Sean Larkin 93ae6bc32a chore(performance) cleanup unused functionality, partial cleanup 2016-12-07 17:22:18 +01:00
Sean Larkin 00f9478ea1 fix(performance): removed a consolelog 2016-12-07 17:22:14 +01:00
Sean Larkin b2622e1bd9 fix(performance): corrected tests, removed options access from stats, added mocks for web target check 2016-12-07 17:22:14 +01:00
Sean Larkin 2b72cc9941 removed unneeded require for path 2016-12-07 17:22:13 +01:00
Sean Larkin 000dae1889 fix(tests): Updated tests across the board to work with perf budgets 2016-12-07 17:22:13 +01:00
Sean Larkin 2741098198 feat(perfbudget): creat initialAssetsCost with hardcoded limit 2016-12-07 17:21:22 +01:00
Tushar Sonawane 34c02a9c15 fix 'no-loop-func' warnings 2016-10-29 18:53:54 +05:30
Raphael Mu 75caa169bc reduce fn.bind(this) usage by aliasing `this` to `self` (#3146) 2016-10-17 13:26:22 -05:00