Commit Graph

269 Commits

Author SHA1 Message Date
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
EugeneHlushko 2aab060f26 Refactor: indexOf >< checks to includes 2018-01-11 18:58:39 +02:00
Tobias Koppers 53a1d6c7b5 replace harmonyModule flag with exportsType 3-state
exportsType falsy: It's non-harmony module
exportsType "namespace": It's a harmony module, the exports is the namespace object
exportsType "default": It's a harmony module, the exports is the default exports, named exports are properties of the default export
2017-12-22 19:42:41 +01:00
Tobias Koppers e829a5ed71 Reset dependencies in unbuild
Elsewise they are cleared in disconnect and module removing doesn't work correctly
2017-12-12 17:01:14 +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 2acd0d410e make `Module.hash` official and use it for caching 2017-12-04 12:23:43 +01:00
Tobias Koppers bb5eb93842 delay rewriting chunks 2017-11-24 18:14:27 +01:00
Tobias Koppers 2201b860a5 Add mode option and choose defaults depending on mode
add optimization options
use development mode for watch/hot/config tests
use production mode for integration/stats tests
create output directory if not existing
move __esModule to runtime
fix dependency behavior for cases without usedExports
2017-11-24 08:17:17 +01:00
Tobias Koppers 485c1673b0 fix typo: explaination -> explanation 2017-11-21 18:52:35 +01:00
Tobias Koppers 95407047c4 fix DllPlugin flagging 2017-11-21 13:09:32 +01:00
Tobias Koppers 5e39ec46ee Allow to override resolve configuration 2017-11-18 08:12:35 +01:00
Tobias Koppers 00f2b5ede7 advanced module type refactoring
added json type
.mjs default to javascript/esm type
adjusted parser plugins to react on module type
2017-11-11 19:27:19 +01:00
Tobias Koppers 41a1d602e1 added WebAssembly Proof of Concept 2017-11-10 09:17:11 +01:00
Tobias Koppers 52bacce0d7 Merge branch 'next' into refactor/cleanup-stuff 2017-11-07 09:15:15 +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 c585ea6bb5 remove _chunksDebugIdent 2017-11-06 12:39:30 +01:00
Tobias Koppers 1b28c93eaf renamed methods 2017-11-06 12:15:23 +01:00
Tobias Koppers bbb66fcca0 bugfix 2017-11-06 11:26:16 +01:00
Tobias Koppers 801138a3b3 allow caching in sortable set and use it 2017-11-03 10:17:08 +01:00
Tobias Koppers 53711d5a76 make deprecations more yelling 2017-09-22 14:13:09 +02:00
Samuel Reed e91a761f0b
fix: Clear optimization bailouts on module.disconnect
Ref: #5562
2017-08-25 00:40:09 -05:00
Tobias Koppers 99c2706ed3 Ensure that graph structure stay consistent
fixes #5527
2017-08-16 14:05:06 +02:00
Tobias Koppers e08d2f55c5 Merge pull request #5127 from timse/nitpicks-3
remove "lastId" as there is no usecase
2017-06-21 22:52:59 +02:00
Tim Sebastian 5b4836d185 remove "lastId" as there is no usecase 2017-06-21 22:22:00 +10:00
Tim Sebastian f7ffed8f3e allow to set chunks and use it in ConcatenatedModule 2017-06-21 08:12:22 +10:00
Tim Sebastian 1a16a3e181 make sort function private 2017-06-19 22:13:44 +10:00
Tim Sebastian 4e5ef0d72d use SortableSet in modules
use SortableSet to keep "_chunks" sorted
2017-06-18 14:33:07 +10:00
Tobias Koppers 1769fa2d95 Merge pull request #5064 from webpack/feature/scope-hoisting-multi-entry
Allow scope hoisting to process modules in multiple chunks
2017-06-14 23:43:41 +02:00
Mike Sherov 8a3018866b use Set for ModuleReason chunk rewriting 2017-06-14 16:52:51 -04:00
Tobias Koppers 5d4ba56c5f Allow scope hoisting to process modules in multiple chunks 2017-06-14 22:46:26 +02:00
Tobias Koppers c0bf82cee2 fixes incorrect deprecation 2017-06-06 13:37:56 +02:00
Tobias Koppers 9cd0cacd14 Merge branch 'master' into next 2017-06-03 16:36:38 +02:00
restrry e1590e005e fix common chunk chunkhash validation 2017-06-01 15:02:53 +02:00
Tobias Koppers d8539561fd add optimization bailout info
track optimization bailout in concat plugin
2017-05-28 15:25:07 +02:00
Tobias Koppers 2bd2d2844c improve a few issues
from review by @Kovensky
2017-05-20 14:54:42 +02:00
Tobias Koppers df44599731 optimize variable 2017-04-22 19:04:11 +02: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
Sergey Melyukov 7adbc2deb9 ES6 refactoring in DependenciesBlock and Module 2017-04-04 00:22:23 +03:00
Tim Sebastian 4438ac9880 remove "removeAndDo" and make usage inline and explicit 2017-02-14 21:16:10 +11:00
Tim Sebastian 4ea380ff68 no need to add removeAndDo to the context
no one else is using it on chunks and `_` indicates its private anyways
2017-02-14 21:16:08 +11: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
Kees Kluskens 644e3a009b Upgrade eslint (#3626)
* Upgrade eslint

* Pin down eslint version

* Temporary fix for difference between js-beautify and eslint

js-beautify suddenly requires a space between `while` here,
but everywhere else we use it without space.

* Remove redundant rules (present in eslint:recommended)

* Add rules comparable to js-beautify rules to eslint

* Add some forgotten files

* Ugh, fix some differences between eslint and js-beautify the nuclear way

* Add back variables
2016-12-29 10:10:41 -06: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 da29d21ae4 performance improvements
breaking change: Module has now a "unbuild" method that must work correctly
2016-12-14 16:22:16 +01:00
James Tautges 5596b5a1ad Use correct property name 2016-10-04 17:15:54 +01:00
James Tautges cabfba9ff2 Cache portable id to avoid expensive function call 2016-10-02 15:33:43 +01: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 65b70bf5ed finished refactory of tree shaking
changes format for dll manifest

#2953
fixes #2959
2016-09-07 09:44:53 +02:00
Tobias Koppers 19eabc7bb6 track which exported are provided by the modules
star export is filtered by provided exports

fixes #2953
2016-09-05 23:41:03 +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 b98debb809 keep strict mode even if code is inserted
fixes #1970
2016-05-05 17:45:58 +02:00
Tobias Koppers 0eb5b20c58 added more stuff to the hash 2016-02-04 00:06:16 +01:00
Tobias Koppers 8cb0ee7b85 mangle harmony export names 2016-02-03 23:40:41 +01:00
Tobias Koppers 6307ed72ac Added experimental usage tracking of ES6 modules and example 2015-10-21 21:05:01 +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
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 cebd3b9722 added linting 2015-04-23 23:55:50 +02:00
Tobias Koppers e0f975eb9e fixes webpack/extract-text-webpack-plugin#14 2014-09-07 22:54:38 +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 d80cdcefac Code Quality 2014-06-24 18:53:32 +02:00
Tobias Koppers 3eefb91a5b cache the generated source
This caches the SourceMap for the eval-source-map devtool
fixes #271
2014-05-17 00:31:52 +02:00
Tobias Koppers c30f16f439 added experimental deduplication support #47 2013-06-12 16:16:06 +02:00
Tobias Koppers 1133a5606e better error reporting 2013-05-18 14:42:11 +02:00
Tobias Koppers 5cdb8cbf81 cache chunks, cache assets 2013-05-08 13:28:54 +02:00
Tobias Koppers ee01837d66 Refactored everything for 0.9 2013-01-30 18:49:25 +01:00