Commit Graph

469 Commits

Author SHA1 Message Date
Florent Cailhol 2a9452e51b Add brackets for multiline if/for statements 2018-05-29 15:45:44 +02:00
Tobias Koppers 342c3c6fec Merge branch 'master' into feature/type-compiler-compilation-save
# Conflicts:
#	yarn.lock
2018-05-24 18:56:04 +02:00
Tobias Koppers 19015b698c fix problems with circular unneeded chunks
fixes #7363
fixes #7239
fixes #6587
2018-05-22 15:30:32 +02:00
Tobias Koppers 3072378892 bugfixes and corrections 2018-05-15 15:04:40 +02:00
Sean Larkin f0ed7b63e8 chore(types): remove dup types, clean up some itesm 2018-05-15 15:04:39 +02:00
Sean Larkin 39195ff62f chore(types): make loose interface for removing reasons ties in Compilation 2018-05-15 15:04:39 +02:00
Sean Larkin 761d73b4e7 chore(types): add Compiler and Compilation type support 2018-05-15 15:04:38 +02:00
Tobias Koppers 5c8a0d23ba Merge branch 'master' into next
# Conflicts:
#	test/statsCases/aggressive-splitting-entry/expected.txt
#	test/statsCases/aggressive-splitting-on-demand/expected.txt
#	test/statsCases/chunk-module-id-range/expected.txt
#	test/statsCases/chunks-development/expected.txt
#	test/statsCases/chunks/expected.txt
#	test/statsCases/color-disabled/expected.txt
#	test/statsCases/color-enabled-custom/expected.txt
#	test/statsCases/color-enabled/expected.txt
#	test/statsCases/commons-chunk-min-size-0/expected.txt
#	test/statsCases/commons-chunk-min-size-Infinity/expected.txt
#	test/statsCases/commons-plugin-issue-4980/expected.txt
#	test/statsCases/define-plugin/expected.txt
#	test/statsCases/exclude-with-loader/expected.txt
#	test/statsCases/external/expected.txt
#	test/statsCases/filter-warnings/expected.txt
#	test/statsCases/import-context-filter/expected.txt
#	test/statsCases/import-weak/expected.txt
#	test/statsCases/limit-chunk-count-plugin/expected.txt
#	test/statsCases/max-modules-default/expected.txt
#	test/statsCases/max-modules/expected.txt
#	test/statsCases/module-assets/expected.txt
#	test/statsCases/named-chunks-plugin-async/expected.txt
#	test/statsCases/named-chunks-plugin/expected.txt
#	test/statsCases/no-emit-on-errors-plugin-with-child-error/expected.txt
#	test/statsCases/optimize-chunks/expected.txt
#	test/statsCases/performance-different-mode-and-target/expected.txt
#	test/statsCases/preset-detailed/expected.txt
#	test/statsCases/preset-normal/expected.txt
#	test/statsCases/preset-verbose/expected.txt
#	test/statsCases/resolve-plugin-context/expected.txt
#	test/statsCases/reverse-sort-modules/expected.txt
#	test/statsCases/scope-hoisting-bailouts/expected.txt
#	test/statsCases/scope-hoisting-multi/expected.txt
#	test/statsCases/simple-more-info/expected.txt
#	test/statsCases/simple/expected.txt
#	test/statsCases/tree-shaking/expected.txt
#	test/statsCases/warnings-uglifyjs/expected.txt
2018-05-01 16:49:08 +02:00
Tobias Koppers 1c0d4f77b0 improve Compilation.processDependenciesBlocksForChunkGroups performance
prepare references for modules
2018-05-01 10:54:00 +02:00
Tobias Koppers 82a71be1dc Cleanup, refactoring, types 2018-04-27 18:53:07 +02:00
Tobias Koppers 9cb1a66317 add support for link preload/prefetch
`import(/* webpackPrefetchPriority: 10 */ "...")`
`import(/* webpackPreloadPriority: 10 */ "...")`
2018-04-16 11:29:25 +02:00
Mohsen Azimi 589f40b26a Add missing class member initializations found by TypeScript 2018-04-11 16:48:44 +02:00
Florent Cailhol fe73712e5b Remove unecessary _this binding 2018-04-10 23:04:20 +02:00
Tobias Koppers 8de560552c sort child compilations for consitent hash
fixes webpack-contrib/mini-css-extract-plugin#75
2018-04-03 17:36:12 +02:00
Tobias Koppers 8d8da4cdff Merge branch 'master' into bump_prettier 2018-03-29 11:48:02 +02:00
Tobias Koppers d4f3c775d5
Merge pull request #6883 from mohsen1/remove-dead-code
Initialize fileTimestamps and contextTimestamps in Compilation
2018-03-29 10:52:06 +02:00
Tobias Koppers 4b6ee7356d
Merge pull request #6894 from webpack/bugfix/css-stuff
fixes for mini-css-extract-plugin
2018-03-29 10:50:38 +02:00
Mohsen Azimi 7a72ee92c0
Merge branch 'master' of github.com:webpack/webpack into remove-dead-code
# Conflicts:
#	lib/Compilation.js
2018-03-28 21:25:46 -07:00
Mohsen Azimi 77535dde7c
Initialize fileTimestamps and contextTimestamps in Compilation 2018-03-28 10:10:28 -07:00
Mohsen Azimi 9728f2d2e0
Revert "Remove dead code in Compilation.js"
This reverts commit 847bfa4c63.
2018-03-28 10:08:25 -07:00
Mohsen Azimi bc76fee70b
Initialize compilationDependencies in Compilation as undefined 2018-03-28 10:05:29 -07:00
Tobias Koppers 93a5bf567f fixes for mini-css-extract-plugin 2018-03-28 16:19:15 +02:00
Mohsen Azimi d2dbed5dda
Update Compilation.js 2018-03-27 22:41:45 -07:00
Mohsen Azimi 864a15977f
Remove extra arguments passed to SortableSet initializing fileDependencies 2018-03-27 22:36:45 -07:00
Mohsen Azimi 847bfa4c63
Remove dead code in Compilation.js 2018-03-27 22:23:47 -07:00
Florent Cailhol f1092ad516 Update prettier toolchain 2018-03-26 16:56:10 +02:00
Tobias Koppers 296542ed79 add [contenthash] support 2018-03-24 12:08:36 +01:00
Florent Cailhol 3983803d30 Destructure 'require' to improve readability 2018-03-22 12:05:58 +01:00
Josh Soref 96ebb27964 spelling: connect 2018-02-26 02:27:17 +00:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Tobias Koppers e52f323750 optimize performance of assignDepth 2018-02-24 14:38:16 +01:00
Suguru Motegi 864e563173 replace Async with Neo-Async 2018-02-11 14:31:08 -08:00
Tobias Koppers d6816afddf
Merge pull request #6355 from webpack/for_of_loops
Use for-of loops instead of forEach
2018-01-24 10:35:58 +01:00
Tobias Koppers 7a1b357aad
Merge branch 'next' into for_of_loops 2018-01-24 09:01:31 +01:00
Tobias Koppers ad75e44d02
Merge branch 'next' into remove_v3_deprecated 2018-01-24 08:45:13 +01:00
Florent Cailhol 7b8fa112e0 Remove v3 deprecated APIs 2018-01-23 23:25:01 +01:00
Florent Cailhol d4811b0d37 Use for-of loops instead of forEach 2018-01-23 22:53:18 +01:00
Florent Cailhol 77bb4c0055 Deprecate forEach* and map* methods 2018-01-23 22:19:59 +01:00
Florent Cailhol 6192e5b413 Use hooks instead of applyPlugins 2018-01-22 15:23:52 +01:00
Tobias Koppers 18ae73dad4 Refactor chunk graph
Chunks are now always in ChunkGroups
ChunkGroups have parents and children, Chunks no longer have this
AsyncDependenciesBlocks point to a ChunkGroup instead of a list of chunks
Entrypoint is now a ChunkGroup (extends from it)
move stuff graph modification methods into GraphHelpers
Change chunk id recording to source-based
Chunks have parents, siblings and children in Stats
rename AutomaticCommonsChunksPlugin to SplitChunksPlugin
add request property to origin (ChunkGroup)
remove moveToParent from AggressiveMergingPlugin
fix issues with AggressiveSplittingPlugin
remove CommonsChunkPlugin
add optimization.runtimeChunk (RuntimeChunkPlugin)
fix a filename bug for initial chunks
remove extract-text-webpack-plugin from test suite
add DebugHash to help debugging hash issues
fix issues with entry modules in different chunk as runtime
redo optimization.splitChunks options
Compilation.entrypoints is now a Map
Compilation.chunkGroups has been added
remove some unittests
update examples
update tests with CommonsChunkPlugin
2018-01-19 19:21:30 +01:00
Florent Cailhol 1590751da2 Replace dictionaries by Map or Set 2018-01-06 09:45:57 +01:00
Tobias Koppers 1886b7a5cb Merge branch 'master' into next
# Conflicts:
#	bin/webpack.js
#	lib/Compilation.js
#	yarn.lock
2017-12-29 11:17:10 +01:00
Maximilien Garenne c4fa27b451 fix lint errors 2017-12-28 14:38:03 +01:00
Maximilien Garenne 71d12979e4
Refresh code of Compilation.js
I replaced some let by const, removed some unecessary this bindings, rewrote the part with self by this with paying attention to keep the binding to this.
2017-12-28 11:39:29 +01:00
Sean Larkin 30ac70083d
Merge pull request #6101 from webpack/feature/tapable-upgrade-json-export-main-template-plugin
feat(tapable): upgrade other template plugins
2017-12-22 21:38:05 -08:00
Tobias Koppers 2a1546d355 fix reversed order in OccurenceOrderPlugin
try to keep original order
fallback order by name if index order fails
2017-12-20 20:35:16 +01:00
EugeneHlushko 370eb38e32 Feature: Disallow to load initial chunk on demand..: rename class to Error 2017-12-19 17:41:56 +02:00
EugeneHlushko 3096317a4b Feature: Disallow to load initial chunk on demand via throwing an error 2017-12-19 17:12:48 +02:00
Sean Larkin fb5351ec25
Merge branch 'next' into feature/tapable-upgrade-json-export-main-template-plugin 2017-12-15 23:48:48 -08:00
Sean Larkin 5eee030cae fix(tapable): refactored calls to iterator and add some destructuring 2017-12-15 16:14:19 -08:00
Tobias Koppers 90c5adef14 linting, unittests 2017-12-12 21:21:02 +01:00
Tobias Koppers c68f224272 move providedExports into buildMeta 2017-12-12 17:01:03 +01:00
Tobias Koppers ffb977fed4 refactor meta -> buildMeta, add factoryMeta
add compat layer to Module.meta
2017-12-12 16:57:50 +01:00
Tobias Koppers 2bb95a3b93 Refactor addModule to keep Module instances between rebuilds 2017-12-12 16:57:50 +01:00
Tobias Koppers 758a388f69 pass runtimeTemplate to DependencyTemplate
move outputOptions and requestShortener into runtimeTemplate
2017-12-11 17:59:32 +01:00
Sean Larkin 25c135aa82 feat(tapable): upgrade other template plugins 2017-12-08 02:05:45 -08:00
Tobias Koppers 7d87f34269 Only create one RequestShortener per Compiler
move Compiler.context assignment into Compiler
2017-12-04 12:23:42 +01:00
Tobias Koppers 0d66130daf always create a CachedSource, because it's accessed multiple times 2017-12-04 12:23:32 +01:00
Tobias Koppers 88ad7ed186 Merge branch 'refactoring/plugin-system-templates' into refactoring/plugin-system-all 2017-11-29 08:07:18 +01:00
Tobias Koppers 56328a7cab upgrate tapable in Templates 2017-11-28 18:43:01 +01:00
Tobias Koppers 7787b4ad13 upgrade tapable for Compilation 2017-11-27 21:14:16 +01:00
Tobias Koppers 5a4f0aca67 change imports of tapable to old version
prepare to migrate to new tapable version
2017-11-27 20:56:42 +01:00
Tobias Koppers a0ef93f939 aggregate all crypto hash usages into util/createHash
try to avoid calling hash.update with short strings
2017-11-23 11:09:17 +01:00
Tobias Koppers 5a8e7673cb fix weak status of harmony accept dependency
add test case for accepting default import
2017-11-22 08:06:47 +01:00
Tobias Koppers 4c4121b948 fix test and lint issues 2017-11-19 09:06:40 +01:00
Tobias Koppers 93171b9795 replace isEqualResource with more performance implementation 2017-11-19 00:22:38 +01:00
Tobias Koppers 5e39ec46ee Allow to override resolve configuration 2017-11-18 08:12:35 +01:00
Tobias Koppers a53672d1a2 Merge branch 'master' into next
# Conflicts:
#	lib/EvalSourceMapDevToolModuleTemplatePlugin.js
#	lib/dependencies/HarmonyDetectionParserPlugin.js
#	lib/dependencies/HarmonyImportDependency.js
#	package.json
#	schemas/webpackOptionsSchema.json
#	test/Validation.test.js
2017-11-17 16:03:46 +01:00
Tushar Sharma ee84d788dd vars to lets and const 2017-11-15 13:58:45 +05:30
Tobias Koppers 65e855c636 fix deprecations 2017-11-11 11:27:02 +01:00
Tobias Koppers 9b9b6eafe0 add deprecation message to Compilation.moduleTemplate 2017-11-10 11:36:49 +01:00
Tobias Koppers 41a1d602e1 added WebAssembly Proof of Concept 2017-11-10 09:17:11 +01:00
Tobias Koppers 860da9baaa
Merge branch 'next' into refactor/sets 2017-11-08 21:28:51 +01:00
Tobias Koppers 75f68a2635 fixes linting, remove not needed context arguments 2017-11-08 20:49:41 +01:00
Tobias Koppers f7c2f8e470 Update code style to arrow functions 2017-11-08 11:56:01 +01:00
Tobias Koppers 447d85ad79 Merge branch 'next' into refactor/sets
# Conflicts:
#	lib/ContextModule.js
#	lib/NormalModule.js
#	lib/optimize/ConcatenatedModule.js
2017-11-08 06:01:24 +01:00
Tobias Koppers 51c572c4f5 refactor more properties to Sets 2017-11-07 09:17:12 +01:00
Tobias Koppers 0339d4da49 Refactor weird things
* Declare used properties in constructor
* Module.(re)building moved into Compilation._(re)buildingModules (Map)
* Make NormalModule.error private
* Move Module.cacheable logic into needRebuild
* More stable implemention of rebuildModule
* addModuleChain waits for Module building finished before returning
* Set built and cacheable flags correctly in Modules
* More portableId into WeakMap
* Add ModuleReason for entrypoints
* cacheable can be true/false/null in Stats
* added Stats module issuerPath
* fixes profile in stats output
2017-11-06 13:16:09 +01:00
Tobias Koppers 82f42e2c67 Merge branch 'master' into next 2017-10-17 12:38:38 +02:00
Tobias Koppers b597322e3c fix behavior and add a warning when trying to load an
initial chunk on demand
2017-10-17 09:06:05 +02:00
Tobias Koppers 814c894168 Merge branch 'master' into next
# Conflicts:
#	lib/optimize/CommonsChunkPlugin.js
#	test/statsCases/limit-chunk-count-plugin/expected.txt
#	test/statsCases/named-chunks-plugin-async/expected.txt
#	test/statsCases/optimize-chunks/expected.txt
2017-10-16 10:47:17 +02:00
Tobias Koppers 11e28793fa improve performance by doing a breath-first traversal in the chunk graph
This is faster because shorter paths usually have less modules available.
This allows to reach minimal modules faster
2017-10-12 20:03:36 +02:00
Tobias Koppers 5abd69680d Merge branch 'master' into next
# Conflicts:
#	lib/Compilation.js
#	test/statsCases/optimize-chunks/expected.txt
2017-10-11 19:26:00 +02:00
Tobias Koppers 7ebf9314d6 Merge pull request #5786 from webpack/performance/chunks
improve chunk graph building performance
2017-10-11 17:05:20 +02:00
Tobias Koppers 2919a9cd53 prevent crashing when error out early in bail mode
fixes #5787
2017-10-11 15:28:18 +02:00
Tobias Koppers 7870bfc01d improve chunk graph building performance
document algorithm
2017-10-11 15:08:00 +02:00
Tobias Koppers 03b0ff2c9c Merge branch 'master' into next 2017-10-11 12:42:31 +02:00
Tobias Koppers 91df794788 bugfix and test for graph correctness 2017-10-11 11:13:36 +02:00
Tobias Koppers 130ace8ba7 fix graph correctness with multiple entries 2017-10-11 10:01:00 +02:00
Tobias Koppers 07992cf588 fix sorting issue 2017-09-22 17:23:49 +02:00
Tobias Koppers 7ceac63f07 add support for pure modules 2017-09-14 09:44:42 +02:00
Tobias Koppers e5f4eb147a Merge branch 'master' into refactor/cleanups 2017-08-12 10:03:51 +02:00
Tobias Koppers 839915ccf7 Merge pull request #5501 from webpack/bugfix/hash-watch-warnings-errors
Warnings and Errors contribute to hash
2017-08-11 17:46:49 +02:00
Tobias Koppers 38201575ea fix lint problem 2017-08-11 16:58:18 +02:00
Tobias Koppers 09c34cf280 remove hash from stats test with error
because error contains an absolute path
2017-08-11 16:28:40 +02:00
Tobias Koppers f9bf8a9085 Limit the number of parallel processed modules
fixes #3164
fixes #3166
2017-08-11 16:11:17 +02:00
Tobias Koppers 7905bf57f0 Warnings and Errors contribute to hash 2017-08-11 14:35:08 +02:00
Adam Thomann 70f5698145 Add semicolon 2017-08-11 00:05:25 -04:00
Adam Thomann 12f20935bc Convert errorAndCallback ternary to arrow function 2017-08-10 23:58:49 -04:00
Tobias Koppers 4c81b9a017 move weak into getReference 2017-08-08 09:43:33 +02:00
Tobias Koppers c1a02446ac store hash in depndencyTemplates Map instead of comparing identify
This restores original performance on incremental builds

fixes #5289
fixes #5277
2017-07-14 13:03:30 +02:00
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
Tobias Koppers 530fad43b4 allow to pass abs path to manifest property of DllReferencePlugin
manifest is loaded on compilation
2016-09-16 01:19:50 +02:00
Tobias Koppers a0a920d83f added experimental plugin to set custom module ids 2016-09-16 01:18:21 +02:00
Tobias Koppers d42d52b388 use specification order for chunks
fixes ##2998
2016-09-16 01:17:28 +02:00
Tobias Koppers a53799c0ac use new RuleSet matching instead of LoadersList
pass issuer via contextInfo
2016-09-15 00:22:10 +02:00
Tobias Koppers 119af18c0c Merge pull request #2497 from achicu/achicu/fix_error_memory_leak
Fixing memory leak causing node go out of memory
2016-08-17 13:06:34 +02:00
Andrey Popp ea84afcefc Fix compilation not to store dependency warnings in modules
Fixes #2803
2016-07-26 13:47:00 +03:00
Tobias Koppers 711a3822fa refactor ModuleFactory to take an object instead of multiple arguments 2016-07-20 12:51:03 +02:00
Tobias Koppers 1675a5a5ca new way to handle new ids, reuse old ids
adjusted HMR to handle id reusing
2016-07-18 00:41:26 +02:00
Tobias Koppers 79eb404257 fixes webpack/extract-text-webpack-plugin#82
fixes webpack/extract-text-webpack-plugin#115
fixes webpack/extract-text-webpack-plugin#170
2016-07-15 21:59:24 +02:00
Tobias Koppers 2f618e733a refactoring and aggressive-splitting plugin 2016-07-13 11:03:14 +02:00
Tobias Koppers 1ee3585fa1 compilation error don't affect parent module
recover after syntax error
assume es6 module on syntax error

#2117
2016-07-03 13:13:01 +02:00
Tobias Koppers 5903cc7b0b refactor how critical warnings are reported 2016-06-24 01:51:52 +02:00
Tobias Koppers ce76858334 add hashSalt option
fixes #2544
2016-06-04 20:03:42 +02:00
Alexandru Chiculita 74548ce628 Setting _this to null to workaround a bug in V8 that keeps Compilation object alive and makes node run out of memory: https://bugs.chromium.org/p/chromium/issues/detail?id=612191 2016-05-16 10:40:37 -07:00
Zane Hitchcox e48ee3fc5a Spelling (#2307)
from dependant to dependent
2016-04-10 22:24:13 +02:00
Tobias Koppers c838656e7f moved defaults for options.output into central place 2016-01-06 23:02:25 +01:00
Tobias Koppers ded70aef28 moves stuff from webpack-core to webpack-sources 2015-12-29 17:44:55 +01:00
Tobias Koppers 3201dc333d Merge branch 'webpack-1'
Conflicts:
	lib/NormalModuleFactory.js
	package.json
2015-11-13 21:58:38 +01:00
Tobias Koppers 6b60662068 performance improvement 2015-11-13 21:55:41 +01:00
Tobias Koppers 4985cb2844 Merge branch 'master' into webpack-2
Conflicts:
	lib/dependencies/ContextDependency.js
2015-10-18 10:55:23 +02:00
Tobias Koppers 5acfacfdd6 replaced Class with constructor 2015-10-18 10:53:38 +02:00
Tobias Koppers 7cbd78c1da Merge branch 'master' into webpack-2
Conflicts:
	.travis.yml
	bin/config-optimist.js
	test/statsCases/define-plugin/expected.txt
2015-09-19 20:11:48 +02:00
Ahmet Katrancı 8ff6cb5fed Report constructor correctly when inheriting from Tapable 2015-08-18 12:35:57 +01:00
Tobias Koppers 5bbfbae551 Merge branch 'master' into webpack-2
Conflicts:
	package.json
	test/statsCases/chunks/expected.txt
2015-07-25 13:49:14 +02:00
Tobias Koppers ea7fd67ec1 fixed #1239 2015-07-22 22:34:25 +02:00
Tobias Koppers 431a4c791c Merge branch 'master' into webpack-2
Conflicts:
	hot/dev-server.js
	hot/only-dev-server.js
	hot/poll.js
	hot/signal.js
	lib/ChunkTemplate.js
	lib/HotModuleReplacement.runtime.js
	lib/HotModuleReplacementPlugin.js
	lib/JsonpMainTemplatePlugin.js
	lib/MainTemplate.js
	lib/NormalModule.js
	lib/Parser.js
	lib/RecordIdsPlugin.js
	lib/WebpackOptionsApply.js
	lib/dependencies/RequireEnsureDependency.js
	lib/node/OldNodeWatchFileSystem.js
	lib/optimize/OccurrenceOrderPlugin.js
	package.json
2015-07-17 09:30:37 +02:00
Tobias Koppers f7d799adb4 rebeautify without spacing after keyword 2015-07-16 00:19:23 +02:00
Avi Haiat 0a340f2b1a feat(app): Beautify all lib files 2015-07-13 01:20:09 +03:00
Avi Haiat 5594eab317 feat(app): Improve eslint and jsbeautify 2015-07-08 15:16:50 +03:00
Tobias Koppers 8cfeb51c30 refactoring and bug fixes 2015-07-07 00:11:13 +02:00
Tobias Koppers cf30eeeb0f Merge branch 'master' into webpack-2
Conflicts:
	lib/ChunkTemplate.js
	lib/Compilation.js
	lib/HotModuleReplacement.runtime.js
	test/TestCases.test.js
	test/statsCases/chunks/expected.txt
	test/statsCases/simple-more-info/expected.txt
	test/statsCases/simple/expected.txt
2015-07-01 00:44:17 +02:00
Tobias Koppers a04ffb9283 added (experimental) NamedModulesPlugin 2015-06-27 22:47:51 +02:00
Tobias Koppers 02522f11c3 throw an error when trying to use [chunkhash]
... when it's not allowed.
I. e. with HMR enabled [chunkhash] for the entry chunk
is not allowed. Now it throws an error.

Also fixes a bug where [chunkhash] doesn't have to correct
length. fixes #1192
2015-06-27 11:34:17 +02:00
Tobias Koppers 4e041dfd52 fixed [chunkhash] and [name] issue
fixed #1181
fixed #1018
2015-06-24 23:17:12 +02:00
Tobias Koppers 41f56a523a Merge branch 'master' into webpack-2 2015-06-13 17:47:50 +02:00
Tobias Koppers e20c485928 reset module index and index2 when loading from cache
consistent entry order
2015-06-13 17:44:52 +02:00
Tobias Koppers 2245c4acca Promise based chunk loading API
don't flag entry module with `0` id anymore
use extra argument in chunk instead
this allows to require entry points
2015-06-13 11:45:28 +02:00
Tobias Koppers 66df34688e Merge branch 'master' into webpack-2
Conflicts:
	bin/convert-argv.js
	lib/webpack.js
2015-06-07 22:24:03 +02:00
Kenny Tran 08d9d87f9a Fix typos 2015-05-26 19:59:02 -07:00
Tobias Koppers ddf6066128 fixed index for entry points 2015-05-25 20:46:23 +02:00
Tobias Koppers c92491ff30 better default for chunkFilename and tests 2015-05-16 16:10:25 +02:00
Tobias Koppers 599c39dbc0 better defaults for filename and chunkFilename 2015-05-16 14:52:23 +02:00
Tobias Koppers ff7848369a Merge branch 'master' into webpack-2
Conflicts:
	bin/webpack.js
	package.json
2015-05-10 20:41:04 +02:00
Tobias Koppers 8a6ac101ea generate two indices, which representent global order
and use the first for sorting modules by default
2015-05-10 18:43:47 +02:00
Tobias Koppers f4b9d5f57a Merge branch 'master' into webpack-2
Conflicts:
	lib/Compilation.js
	lib/Compiler.js
	lib/DefinePlugin.js
	lib/HotModuleReplacementPlugin.js
	lib/Parser.js
	lib/node/NodeSourcePlugin.js
	lib/node/OldNodeWatchFileSystem.js
	package.json
2015-04-27 20:22:13 +02:00
Tobias Koppers cebd3b9722 added linting 2015-04-23 23:55:50 +02:00
Tobias Koppers 9c26ffe6a8 Merge branch 'master' into webpack-2
Conflicts:
	lib/Stats.js
2015-04-20 21:08:42 +02:00
Tobias Koppers 3419ddcb29 use dedupe plugin later in compilation
fixed webpack/style-loader#54
2015-04-20 19:39:02 +02:00
Tobias Koppers ed75627f06 Merge branch 'master' into webpack-2
Conflicts:
	bin/convert-argv.js
	package.json
2015-04-14 20:09:29 +02:00
Tobias Koppers 0431b74149 added cheap-source-map and lineToLine option 2015-04-05 01:52:30 +02:00
Tobias Koppers c4db71c9d6 added some async steps to prevent stack overflows 2015-04-03 23:39:58 +02:00
Tobias Koppers 8fef0c79f3 cache sources 2015-04-03 19:47:53 +02:00
Tobias Koppers ab149eb4d4 Merge branch 'hot-multi-pass' of https://github.com/webpack/webpack.git into webpack-2
Conflicts:
	lib/Compilation.js
2015-03-05 22:30:24 +01:00
Tobias Koppers a4a72607f0 throw Error when multiple chunks emit to the same filename 2015-03-05 22:02:01 +01:00
Tobias Koppers 63eff24427 removed namedChunkFilename 2015-03-05 22:01:36 +01:00
Tobias Koppers 13b60359f4 DedupePlugin correctly inserts deduplication code
fixed #770
2015-02-09 08:43:46 +01:00
Tobias Koppers 769d40eec5 profile earlier and from cache 2015-02-04 23:22:32 +01:00
Tobias Koppers e9acc3907e remove issuer for entry and prefetch 2015-02-04 23:22:31 +01:00
Tobias Koppers 725371e271 separate module assets from chunk assets 2015-01-31 16:19:36 +01:00
Tobias Koppers fb49376f6d Added multi pass hot mode #669 2015-01-30 00:46:52 +01:00
Tobias Koppers adfcfce15f watching of missing files, fixed #668
store missing files from errors for missingDependencies
make the new watching plugins default
added OldWatchingPlugin
2015-01-17 21:55:44 +01:00
Tobias Koppers de1ea9d15e allow multiple chunks for a dependency block #640 2015-01-01 21:58:27 +01:00
Tobias Koppers 738c1d3e68 support library with CommonsChunkPlugin
fixes #622
2014-12-22 16:10:23 +01:00
Tobias Koppers 1c9fd48839 reorganized function 2014-11-02 12:17:05 +01:00
Tobias Koppers 8131061c8e added weak dependencies, require.resolveWeak
#526
2014-10-13 16:10:19 +02:00
Jason Anderson f371945a29 Add TemplatedPathPlugin 2014-09-11 15:31:08 +02:00
Tobias Koppers 9a8cae6d43 added `NoErrorsPlugin`, which doesn't emit on error
fixes webpack/webpack-dev-server#42
fixes #449
2014-09-03 14:16:17 +02:00
Tobias Koppers 37aa1ff7d5 support parallel build and rebuild
expanded css bundle example
2014-07-29 00:13:25 +02:00
Tobias Koppers e2f83e195d add more complex css-bundle examples
add rebuild module
add chunkName parameter to CommonsChunkPlugin
fix bug in LimitChunkCountPlugin
2014-07-19 14:32:48 +02:00
Tobias Koppers 03c87c11a4 support [name] in chunkFilename
fixes #358
2014-07-17 01:52:41 +02:00
Dan Abramov 6085815327 Don't call the callback twice on error (fixes #347) 2014-07-07 18:11:40 +04:00
Tobias Koppers 5104661855 optional externals
track optional modules
optional externals for UMD and root
fixes #339
2014-07-03 00:00:06 +02:00
Tobias Koppers d80cdcefac Code Quality 2014-06-24 18:53:32 +02:00
Tobias Koppers 80f3c48d99 better code style 2014-06-03 21:03:21 +02:00
Tobias Koppers 42c82f6b77 refactored ModuleTemplate to plugin interface 2014-06-03 08:45:26 +02:00
Tobias Koppers 5264f69ddf refactored HotChunkUpdateTemplate to plugin interface 2014-06-03 00:14:46 +02:00
Tobias Koppers a0394a061b refactored ChunkTemplate with plugin interface 2014-06-02 23:40:50 +02:00
Tobias Koppers 3247725ba3 refactored MainTemplate to plugin interface 2014-06-02 21:23:53 +02:00
Tobias Koppers 07e29e2348 expose module on entry dep 2014-05-26 23:53:48 +02:00
Tobias Koppers 5c3f8cc345 Don't render and emit entry assets if not needed
webpack/webpack-dev-server#21
2014-04-19 21:35:01 +02:00
Tobias Koppers 1f651d6fcb add an additional hook 2014-04-18 12:56:19 +02:00
Tobias Koppers e2c0866c62 chunk ids are unique now, so this is no longer needed 2014-04-17 09:08:46 +02:00
Tobias Koppers 8229f59adf allow initial chunks to have other ids than 0 2014-02-11 13:27:41 +01:00
Tobias Koppers d3a9712193 bug fixing 2014-02-03 18:12:19 +01:00
Tobias Koppers e246c5badc added optimize-tree hook, reset module on build 2014-01-29 10:13:28 +01:00
Tobias Koppers 89fb178917 add origin for used named chunks 2014-01-24 13:32:58 +01:00
Tobias Koppers 30f954067c track chunk origin 2014-01-23 15:31:40 +01:00
Tobias Koppers 1fa9169cf2 use initial flag for initial loaded chunks 2013-12-03 23:11:14 +01:00
Tobias Koppers 6c6e495ae7 better commons naming #128 2013-12-03 11:19:30 +01:00
Tobias Koppers 4d25d521f6 plugin to extract common modules
from multiple entry points
#128
2013-12-03 09:27:15 +01:00
Tobias Koppers e62e3a2223 fixed race condition for loadModule 2013-10-29 14:14:16 +01:00
Tobias Koppers 52b40b3798 allow loaders to load modules
fixed templates readable name
2013-10-28 16:21:29 +01:00
Tobias Koppers d56dce7e52 more details in progress 2013-10-12 22:40:15 +02:00
Tobias Koppers 58586f8ae2 make it webpack-able 2013-07-10 23:20:07 +02:00
Tobias Koppers a7bce382bc fixed global leak 2013-07-04 12:11:17 +02:00
Tobias Koppers 49506c83bb HOT: added update json info file, fixed infinite hash updates, #26 2013-07-01 13:59:02 +02:00
Tobias Koppers 8b2301056d added hot module replacement, fixes #26 2013-06-19 13:49:57 +02:00
Tobias Koppers 327a990070 fixed bugs 2013-06-19 11:53:03 +02:00
Tobias Koppers f84f000149 records, typo 2013-05-31 12:22:40 +02:00