Commit Graph

75 Commits

Author SHA1 Message Date
Florent Cailhol 63b4523a15 Pass 'context' as constructor argument 2018-01-30 21:40:44 +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 77bb4c0055 Deprecate forEach* and map* methods 2018-01-23 22:19:59 +01:00
Tobias Koppers c820054a20 remove unused function 2018-01-21 11:33:21 +01:00
Tobias Koppers 0206949075 remove unused code 2018-01-21 11:12:36 +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
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