Commit Graph

102 Commits

Author SHA1 Message Date
Sean Larkin 761d73b4e7 chore(types): add Compiler and Compilation type support 2018-05-15 15:04:38 +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
Tobias Koppers ffb977fed4 refactor meta -> buildMeta, add factoryMeta
add compat layer to Module.meta
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
Tobias Koppers 515a07adbf fix non-harmony import() handling for `null` 2017-12-04 15:49:34 +01:00
Tobias Koppers 3803c8ad4e handle non-esm correctly in import()
return namespace object in normal import() and context import()
add namespaceObject flag to ContextModule options
change tests for updated behavior
2017-12-04 12:58:32 +01:00
Tobias Koppers b608ee7f7b add resourceQuery to ContextModule identifier 2017-12-04 12:04:35 +01:00
Tobias Koppers 5e39ec46ee Allow to override resolve configuration 2017-11-18 08:12:35 +01:00
Tobias Koppers 33c7970c0d
Merge pull request #5732 from anuraaga/context-query
Support resourceQuery in context dependencies.
2017-11-16 14:16:19 +01:00
Anuraag Agrawal ce266cb6f6 Support resourceQuery in context dependencies. 2017-11-16 15:20:50 +09: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 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 ea56916d53 rename `async` to `mode` in context options
`async: false` is now `mode: "sync"`
2017-10-16 14:49:51 +02:00
Tobias Koppers 47d00a525f use util.deprecate to deprecate properties in ContextModule 2017-10-16 12:16:07 +02:00
Tobias Koppers aa8d076407 fix comment 2017-10-16 09:36:59 +02:00
Landon Crapo 0a141f21c8 fixed failing tests 2017-10-13 17:51:01 -06:00
Landon Crapo bc6c1be90c refactoring filter to include and other requested changes 2017-10-13 15:41:44 -06:00
Landon Crapo 5d1759fd4c modified import context filtering logic to filter on file names. 2017-10-13 15:41:02 -06:00
Tobias Koppers 72544de846 code cleanup 2017-07-26 15:13:39 +02:00
Tobias Koppers 94e0fcb80a rename eager-weak to weak in import() comment
rename ImportEagerWeak to ImportWeak
rename "eager-weak" asyncMode to "async-weak"

weak dependencies don't need to be in dependencies blocks
2017-07-26 14:49:37 +02:00
James Gillmore 8bca2dc95c fix/feat($weak): add context support for resolveWeak + create eager-weak asyncMode 2017-07-26 13:12:59 +02:00