Commit Graph

125 Commits

Author SHA1 Message Date
Tobias Koppers bad9d8a271 move Module.id into ChunkGraph
remove disconnect and unseal from Module
2018-08-28 15:08:52 +02:00
Tobias Koppers 02b15a1b46 pass chunkGraph to updateHash instead of moduleGraph
pass chunkGraph to compareModulesById instead of moduleGraph
pass chunkGraph to methods of RuntimeTemplate
use comparators from module at some places
2018-08-28 12:06:53 +02:00
Tobias Koppers 670502fc81 Move AsyncDependenciesBlock.chunkGroup into ChunkGraph 2018-08-22 20:17:49 +02:00
Tobias Koppers eb63cf80d6 move built flag into Compilation 2018-08-22 15:33:16 +02:00
Tobias Koppers 381e2db200 replace Module.reasons and Dependency.module with ModuleGraph 2018-08-02 17:54:44 +02:00
Tobias Koppers 11e127d162 pass moduleGraph along with multiple methods 2018-08-02 17:54:42 +02:00
Tobias Koppers ec1329a7d4 make libIdent required
add types
2018-08-02 16:29:20 +02:00
Tobias Koppers 4ce109f8c1 change arguments of Generator.generate and Module.source into a object to be easier extensible
add JavascriptModulesPlugin.getHooks().shouldRender to decide if a module should be rendered
2018-08-02 16:07:29 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Tobias Koppers 22c4756c9e add more types to Module 2018-07-25 12:38:34 +02:00
Tobias Koppers bc10939096 add types for Module and subclasses
better way to handle "optional" methods
2018-07-25 12:12:17 +02:00
Tobias Koppers 66d3f319a6 Merge tag 'v4.16.2' into next
4.16.2
2018-07-23 12:19:16 +02:00
Tobias Koppers 2b14ddc984 Merge tag 'v4.16.0' into next
4.16.0
2018-07-11 11:13:47 +02:00
Tobias Koppers 569c415623
Merge branch 'master' into enable-noImplicitThis 2018-07-11 08:43:26 +02:00
Tobias Koppers 79846d138f make loc in context dependencies a correct object 2018-07-10 10:25:13 +02:00
Mohsen Azimi a0e1ad920e Enable noImplicitThis TypeScript compiler option 2018-07-05 08:07:46 +03:00
Tobias Koppers 0a06f19fd8 Merge tag 'v4.15.0' into next
4.15.0
2018-07-04 22:19:50 +02:00
Tobias Koppers fb2c24bf76 add `splitChunks.maxSize` option
add `splitChunks.fallbackCacheGroup`
add `splitChunks.hidePathInfo`
move `contextify` into utils
add some types
2018-07-04 10:45:02 +02:00
Florent Cailhol 91663f19a2 Remove deprecated APIs 2018-06-27 10:08:12 +02:00
Tobias Koppers b4699c0657 add order for DependencyReference
and add types for touched code
2018-06-08 13:20:57 +02:00
Florent Cailhol 2a9452e51b Add brackets for multiline if/for statements 2018-05-29 15:45:44 +02:00
Tobias Koppers 770847171d Merge branch 'master' into bugfix/namespace-object
# Conflicts:
#	lib/RuntimeTemplate.js
2018-05-28 22:42:21 +02:00
Oded Niv 17fd4d8b48 Align 'Cannot find module' message with native NodeJS 2018-05-15 09:24:16 +03:00
Tobias Koppers a926a19715 create better namespace objects
avoid using Object.assign (fixes #7162)
2018-05-03 12:55:00 +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
Tobias Koppers 8d8da4cdff Merge branch 'master' into bump_prettier 2018-03-29 11:48:02 +02:00
Tobias Koppers f600ccd264
Merge pull request #6827 from Connormiha/optimize-sort-by-identifier
Save identifier module after first getting
2018-03-29 11:00:54 +02:00
Tobias Koppers 93a5bf567f fixes for mini-css-extract-plugin 2018-03-28 16:19:15 +02:00
Florent Cailhol f1092ad516 Update prettier toolchain 2018-03-26 16:56:10 +02:00
Tobias Koppers 9012ab9ace
remove duplicate assignment 2018-03-26 15:46:05 +02:00
Mihail Bodrov ee22d498fe Compute identifier in context module in constructor 2018-03-24 19:02:30 +01:00
Mihail Bodrov 8c11da5219 Save identifier module after first getting 2018-03-23 00:53:26 +03:00
Florent Cailhol 3983803d30 Destructure 'require' to improve readability 2018-03-22 12:05:58 +01:00
Tobias Koppers 6a5d081f29
Merge pull request #6591 from jsoref/spelling
Spelling
2018-02-27 12:50:34 +01:00
Tobias Koppers 8bf15740bb CJS fake namespace object contains exports now
#6576
2018-02-26 19:11:53 +01:00
Josh Soref 581069bb56 spelling: uncaught 2018-02-26 02:50:05 +00:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Florent Cailhol 63b4523a15 Pass 'context' as constructor argument 2018-01-30 21:40:44 +01: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 9c8098c635
Merge pull request #6370 from webpack/remove_v3_deprecated
Remove v3 deprecated APIs
2018-01-24 09:43:10 +01:00
Tobias Koppers 7a1b357aad
Merge branch 'next' into for_of_loops 2018-01-24 09:01:31 +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
Evan Scott 1f29fa9b51 perf: refactor various timestamp caches into ES6 Maps
This change satisfies https://github.com/webpack/webpack/issues/6234
which desires to change the timestamp caches from plain objects to
the ES6 Map type to avoid deopts, since v8 expects things to be
added to Maps but objects are only fast if properties aren't added
dynamically after initial assignment.
2018-01-23 02:30:22 -05: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
Vitali Kuzmich 3a89252c62 Avoid extra semicolons in bundled files. Don't recreate the function on an each iteration. 2018-01-06 05:18:40 +03:00
Tobias Koppers ed811a5aa8 remove repeated code 2017-12-22 19:42:44 +01: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 2aac6badd5 move generated runtime code to RuntimeTemplate 2017-12-22 19:41:28 +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