Commit Graph

4486 Commits

Author SHA1 Message Date
Tobias Koppers 4f813e28a9 remove customizability of __webpack_require__ function name 2018-11-05 13:13:05 +01:00
Tobias Koppers d197b6664a show module count earlier when they are added to the queue 2018-11-05 11:07:35 +01:00
Tobias Koppers cf76e1c0e2
Merge pull request #8333 from webpack/bugfix/follow-up-8109
minor fixes for #8109
2018-11-05 10:35:57 +01:00
Tobias Koppers 86535693f1 Partial update of #8294, compat layer is no longer needed 2018-11-05 10:28:56 +01:00
Tobias Koppers 6e64480e9d Partial revert of #8250 as this is no longer a limitation 2018-11-05 10:28:51 +01:00
Tobias Koppers b19337e2ad Partial update of #8279, defaults can be changed in a breaking way 2018-11-05 10:28:37 +01:00
Tobias Koppers 8cf1cdb74f Merge tag 'v4.25.0' into next
4.25.0
2018-11-05 10:27:45 +01:00
Tobias Koppers e1c77f64e8
Merge pull request #8231 from webpack/ci-node-nightly-next
Some minor fixes and comments
2018-11-05 09:16:29 +01:00
Tobias Koppers 32db215dda minor fixes for #8109 2018-11-05 09:13:40 +01:00
Tobias Koppers cc28367a78
Merge pull request #8109 from webpack/refactor/templatedPaths
refactor(TemplatedPathPlugin): split placeholder context (`chunk|module`)
2018-11-05 09:03:00 +01:00
Tobias Koppers 355590e7c4
Merge pull request #8250 from Aladdin-ADD/patch-3
fix: disable ProvidePlugin for javascript/esm (fixes #7032)
2018-11-05 08:59:20 +01:00
Tobias Koppers 0293c3a5ee
Merge pull request #8279 from smelukov/support-entry-progress
ProgressPlugin: support progress by entry points
2018-11-05 08:55:30 +01:00
Tobias Koppers fe66257770
Merge pull request #8276 from smelukov/deterministic-module-ids-in-prod
Set deterministic module ids in prod by default
2018-11-05 08:09:57 +01:00
Tobias Koppers 1ea411baad
Merge pull request #8139 from NaviMarella/FormatManifest
Adding format option for Dll Plugin to get a formatted manifest json. #7992
2018-11-05 08:08:21 +01:00
Tobias Koppers 3d745045a1 add missing hooks to progress 2018-11-04 10:36:47 +01:00
Tobias Koppers 56d8a8f010 prevent writing the same message multiple times to stderr 2018-11-04 10:33:37 +01:00
Tobias Koppers 64e3826067 use flags to show different parts of the progress message
refactor activeModules to Set for performance reasons
2018-11-04 10:33:14 +01:00
Tobias Koppers 8c5e74fd66 Merge branch 'master' into support-entry-progress 2018-11-04 09:47:32 +01:00
Lex Alexander 84bc9bce48 test(Compiler): Promisifed webpack returns errors as a return value
Fixes #8298
2018-11-04 09:40:51 +01:00
Tobias Koppers eb6831673a
Merge pull request #8294 from ljqx/zhbliu/import-parser-plugin-fix-context-return
[ImportParserPlugin] fix return value when creating context for `import()`
2018-11-03 23:28:22 +01:00
Tobias Koppers 22aee1ec69 fix shortcut condition 2018-11-03 21:59:27 +01:00
Tobias Koppers 818983ada5
Merge pull request #8323 from webpack/types/template-hooks
Add hook types for templates
2018-11-03 21:26:14 +01:00
Tobias Koppers ec6fb449c5
Merge pull request #8321 from webpack/refactor/serializer
Simplify Serializer
2018-11-03 21:23:46 +01:00
Tobias Koppers 590971a4ca
Merge pull request #8324 from webpack/types/various-plugins
Add types to various plugins
2018-11-03 21:22:41 +01:00
Tobias Koppers 1a541e12ce Perform replacmenents even without parser 2018-11-03 11:19:37 +01:00
Tobias Koppers f0dfc45b9f merge parts too when simplifying
fix bug which keeps const conditional expression in bundle
remove parsing code from ContextDependencyHelpers
2018-11-03 11:16:16 +01:00
Florent Cailhol d881bb4c8f Add types to various plugins 2018-11-02 21:06:35 +01:00
Tobias Koppers 31e189fcde Merge tag 'v4.24.0' into next
4.24.0
2018-11-02 18:02:39 +01:00
Florent Cailhol 84c915b191 Add hook types for templates 2018-11-02 15:40:13 +01:00
Florent Cailhol 0d7889faab Remove unneeded intermediate objects 2018-11-02 11:57:42 +01:00
Florent Cailhol c747449c65 Simplify objectToMap by using Object.entries 2018-11-02 11:22:18 +01:00
Florent Cailhol 2a440fe925 Update development tools 2018-11-02 11:04:02 +01:00
Tobias Koppers f5c3bedf8e replace with a single regexp
for performance reasons
2018-11-01 20:23:11 +01:00
Tobias Koppers e7ec244415 do not mutate data 2018-11-01 20:23:10 +01:00
Tobias Koppers 533c00efa0 remove unnecessary properties 2018-11-01 20:23:10 +01:00
Tobias Koppers 5da271287c use not deprecated default 2018-11-01 20:23:10 +01:00
Tobias Koppers ad3556b72d webassemblyModuleFilename can't use filename
we don't have this information at runtime and would need it to load the file
2018-11-01 20:23:10 +01:00
Tobias Koppers b590e4ba8e refactor placeholders a bit
add deprecation message to old placeholders
group them by context
2018-11-01 20:23:10 +01:00
Tobias Koppers b4b5223469 refactor method to use a replacements map 2018-11-01 20:23:09 +01:00
Tobias Koppers 197e98a845 filename is always a string 2018-11-01 20:23:09 +01:00
Michael Ciniawsky 8d741fbb0e refactor(BannerPlugin): unify `filename` handling
BREAKING CHANGE: removes `basename` && `query` params (`options.banner`)
2018-11-01 20:23:09 +01:00
Michael Ciniawsky 56c49bdc9d refactor(TemplatedPathPlugin): split placeholder context (`chunk|module`) 2018-11-01 20:23:09 +01:00
Tobias Koppers c292e406b4 fix merge issue 2018-11-01 20:21:33 +01:00
Tobias Koppers e3c63b4424 improve debug hash with stack trace 2018-11-01 20:21:33 +01:00
Tobias Koppers 767b15f3b9 add comment 2018-11-01 20:21:33 +01:00
Tobias Koppers 02ba24aca8 add a `cache` option to control the resolve cache 2018-10-31 13:55:28 +01:00
Tobias Koppers 3b35fd478c use module.unsafeCache only for node_modules
remove unsafe resolve cache remainings
2018-10-31 13:17:32 +01:00
Tobias Koppers 4ed5622b53 add direct memory cache 2018-10-31 13:07:07 +01:00
薛定谔的猫 7c8f0c9427
fix: disable ProvidePlugin (fixes #7032) 2018-10-31 19:45:34 +08:00
Tobias Koppers 7dc8e519f9
pass { module } instead of module
Co-Authored-By: FranckFreiburger <FranckFreiburger@users.noreply.github.com>
2018-10-31 09:21:03 +01:00
Zhibin Liu 88aab1e3cb fix jsdoc 2018-10-30 23:50:09 +08:00
Zhibin Liu c740380694 fix jsdoc 2018-10-30 23:43:44 +08:00
Franck Freiburger 2b0025af35
add module argument to DefinePlugin.runtimeValue functions
PR #6793 added the ability for DefinePlugin to use function that return values.
This PR just add the ability to these functions to access the module being parsed (see #8301).
eg.
```
  webpack.DefinePlugin.runtimeValue(module => module.resource ....)
```
2018-10-30 16:11:33 +01:00
Tobias Koppers 2688b5b17f add resolver cache 2018-10-30 15:43:26 +01:00
Tobias Koppers 9964a8283f fix resolver cache 2018-10-30 15:43:24 +01:00
Zhibin Liu 25af83f288 fix after comments 2018-10-30 19:39:43 +08:00
Tobias Koppers 9e3cecc21e resolve promise even if caching failed 2018-10-30 09:54:53 +01:00
Tobias Koppers 3c8bb29834 use lazy serialization when etag is passed 2018-10-30 09:54:51 +01:00
Tobias Koppers 0cc84d8227 default to packed mode 2018-10-30 09:54:49 +01:00
Tobias Koppers b1073349eb reorder maps to make binary encoding more efficient 2018-10-30 09:54:47 +01:00
Tobias Koppers a594f9884c add another loglevel to the persistent cache 2018-10-30 09:54:45 +01:00
Tobias Koppers 590772b934 add packed store mode 2018-10-30 09:54:40 +01:00
Zhibin Liu 16ff800985 handle conditional evaluated to template string 2018-10-30 16:22:09 +08:00
hztianxiang d66cce2601 add test case by this change 2018-10-30 15:49:48 +08:00
Tobias Koppers 4174521f9d remove unnecessary module arguments from module attached errors 2018-10-29 22:18:08 +01:00
Tobias Koppers e9db83c6c7 add serializer for acorn Position 2018-10-29 22:16:40 +01:00
Zhibin Liu d3041bc816 only walk expressions that are not replaced by ContextDependency 2018-10-30 00:33:58 +08:00
Sergey Melyukov aa8cb0fab7 ProgressPlugin: refactoring 2018-10-29 15:49:31 +03:00
hztianxiang c5fff759ee fix lint 2018-10-29 20:39:59 +08:00
hztianxiang a5e1f30c6b @ fix 8297 issues 2018-10-29 20:25:06 +08:00
Zhibin Liu c5a7febe3c [ImportParserPlugin] when need creating context, should return false instead of true 2018-10-29 00:19:47 +08:00
Sergey Melyukov 8b962a61b5 Set deterministic module ids in prod by default 2018-10-25 17:56:59 +03:00
Tobias Koppers c46d89b02d serialize JS Errors 2018-10-25 10:52:33 +02:00
Michael Ciniawsky f7df43d080 feat(ErrorObjectSerializer): make `{Error}` serializable 2018-10-25 10:52:32 +02:00
Tobias Koppers c27b46ac8b fix duplicate errors and warnings 2018-10-25 10:52:31 +02:00
Tobias Koppers 6a8e201521 fixup WebpackErrors 2018-10-25 10:52:28 +02:00
Michael Ciniawsky 62d4ede848 make WebpackErrors serializable 2018-10-25 10:48:39 +02:00
Tobias Koppers 440be0c53c Merge tag 'v4.23.1' into next
4.23.1
2018-10-25 10:34:31 +02:00
Tobias Koppers f667e5355a
Merge pull request #8267 from smelukov/define-plugin-reevaluate-runtime-in-watch
DefinePlugin: reevaluate runtime values on watch mode
2018-10-25 10:31:42 +02:00
Tobias Koppers 5e5e7b7882
Merge pull request #8270 from ljqx/logical-expression-fix
[ConstPlugin] fix bug introduced by evaluation of && and ||
2018-10-25 10:21:10 +02:00
Zhibin Liu 13d1dabd93 [ConstPlugin] fix bug introduced by evaluation of && and || 2018-10-25 10:43:26 +08:00
Sergey Melyukov dae811b083 DefinePlugin: reevaluate runtime values on watch mode when fileDependecies is true
closes #7717
2018-10-24 22:35:08 +03:00
Tobias Koppers 69cfc6ff57 fix incorrect merge
Chunk.hasEntryModule is deprecated
2018-10-24 20:30:39 +02:00
Tobias Koppers d9a0d3a139 Merge tag 'v4.23.0' into next
4.23.0
2018-10-24 20:10:30 +02:00
Tobias Koppers 298fa4c981
Merge pull request #8266 from ljqx/wasm-finalize-exports-fix
[WasmFinalizeExportsPlugin] check if `ref` is null before using it
2018-10-24 17:41:54 +02:00
Tobias Koppers 1c44f95b8c fix bug where module is referenced which is not in the graph 2018-10-24 15:45:10 +02:00
Tobias Koppers 98d077d0b6 order values with different types correctly 2018-10-24 15:45:08 +02:00
Tobias Koppers f5e45bec2e also export WebAssembly.Global when reexporting globals
This is not the final behavior and this code is probably removed soon,
but it mirrors the existing behavior for node.js >= 11 and CI will pass
2018-10-24 15:45:06 +02:00
Zhibin Liu 48656d22b9 [WasmFinalizeExportsPlugin] check if `ref` is null before using it 2018-10-24 21:07:37 +08:00
Tobias Koppers af4cb35784
Merge pull request #8175 from cacheflow/add-tracking-of-removed-files
feat(Compiler): Add file removal tracking in watch-run
2018-10-24 10:44:40 +02:00
Tobias Koppers 7654a1cefe fix behavior and add test case 2018-10-24 10:02:12 +02:00
Fabian Mastenbroek 6bdc47b4b2 Fallback to shortest when both chunks have entry modules 2018-10-24 09:47:30 +02:00
Fabian Mastenbroek 462604a096 Prefer chunks with entry module when picking name (#7516)
This change changes the algorithm for picking the name of a chunk when
integrating two chunk, by choosing the chunk with an entry module. If
none have one, we use the old algorithm instead, choosing based on the
shortest name.

Fixes #7516
2018-10-24 09:47:28 +02:00
Tobias Koppers a262b83580 remove globalPath and useChunkHash feature
It's no longer needed, because we hash the runtime how
2018-10-24 09:39:51 +02:00
renatoagds 7e0ca7193d move watchMode trigger for watch in compiler and close in watching 2018-10-23 14:52:32 -03:00
Tobias Koppers 071062422e Merge tag 'v4.22.0' into next
4.22.0
2018-10-23 16:41:31 +02:00
Tobias Koppers 0ae4a58918 make AggressiveSplittingPlugin stable 2018-10-23 11:32:41 +02:00
Tobias Koppers 94eb554dc0 fix byId sorting 2018-10-23 11:32:39 +02:00
Tobias Koppers 60b06472f5 make LimitChunkCountPlugin stable
fix integrating non-runtime with runtime chunk
move entry modules when integrating two chunks
2018-10-23 11:32:36 +02:00
Tobias Koppers 1e29c44df3 move natural chunk comparator to comparators
add name order to natural chunk order
2018-10-23 11:32:34 +02:00
Tobias Koppers 83866b0dac use stable sorting for sorting dependencies 2018-10-23 11:32:32 +02:00
Tobias Koppers ad8f8910e2 make origins sorting deterministic
remove duplicate origins
2018-10-23 11:32:30 +02:00
Tobias Koppers b146c7ac41 revert incorrect change
The Buffer can be a slice of the underlying buffer
2018-10-23 08:43:21 +02:00
renatoagds 2f7533202c adding watchMode flag in compiler 2018-10-22 19:23:47 -03:00
Tobias Koppers 5165a90de8
Merge pull request #8242 from webpack/perf/chunk-graph
Optimize chunk graph algorithm
2018-10-20 06:09:58 +02:00
Tobias Koppers 5e4a6a4f5d fix byId sorting 2018-10-19 13:20:48 +02:00
Tobias Koppers c04747f17d make LimitChunkCountPlugin stable 2018-10-19 12:57:27 +02:00
Tobias Koppers a7db689306 make chunk compare stable 2018-10-19 12:57:26 +02:00
Tobias Koppers 3217d02aab make stats assets order stable by providing a default order 2018-10-19 12:57:25 +02:00
Tobias Koppers 98b482efd7 make dependency order stable 2018-10-19 12:57:24 +02:00
Tobias Koppers 8a8111b637 make sorting in Stats stable 2018-10-19 12:57:23 +02:00
Tobias Koppers 511d15bbc4 make origins sorting deterministic
remove duplicate origins
2018-10-19 12:57:22 +02:00
Tobias Koppers 65d9ffb91e Optimize chunk graph algorithm 2018-10-19 10:37:43 +02:00
Lex Alexander 2cdf04e14b feat(Compiler): Add file removal tracking in watch-run
-Closes 5072.
2018-10-18 15:58:58 -07:00
Tobias Koppers 8512b4a81d fix wrong array instead of object type for jsIncompatibleExports 2018-10-18 17:35:36 +02:00
Tobias Koppers 318da93ce2 make Raw and ExternalModule serializable 2018-10-18 16:02:45 +02:00
Tobias Koppers 4b69df1117 allow to make classes not-serializable
make ContextModule not-serializable because it's not needed
2018-10-18 15:52:22 +02:00
Tobias Koppers e8da87d2c8 refactor AMDRequireDependency and make it serializable 2018-10-18 15:30:54 +02:00
Tobias Koppers 0fc007f364 refactor RequireEnsureDependenciesBlock and make it serializable 2018-10-18 12:44:46 +02:00
Tobias Koppers 2bd2985d19 make RequireEnsureItemDependency serializable 2018-10-18 12:44:45 +02:00
Tobias Koppers 2ab9ceccfd fix request in ImportContextDependency 2018-10-18 12:44:44 +02:00
Tobias Koppers 06cd79f17f add serializer for RegExp 2018-10-18 12:44:38 +02:00
Tobias Koppers d5ad14813f create Source with Buffers for WASM 2018-10-18 12:44:31 +02:00
Tobias Koppers 4947a5ac71 allow all Sources to be serialized
serialize internal structure of CachedSource
2018-10-18 12:44:27 +02:00
Tobias Koppers 1a3007ac92 make ImportDependenciesBlock serializable 2018-10-18 12:44:15 +02:00
Tobias Koppers 1d9f8a332f
Merge pull request #8233 from ljqx/const-plugin-logical-operator
[ConstPlugin] add support for logical expressions (&& and ||)
2018-10-18 09:57:23 +02:00
Zhibin Liu dcd38348e5 fix comments 2018-10-18 14:21:12 +08:00
Tobias Koppers 40f0e91325 fixup: ImportDepBlock 2018-10-17 23:24:53 +02:00
Tobias Koppers d3a34f733b make options object in ContextDep optional 2018-10-17 23:10:14 +02:00
Tobias Koppers f987d82979 move creation of ImportDep out of ImportDepBlock constructor 2018-10-17 23:09:21 +02:00
Tobias Koppers f23ce49040 remove module argument from AsyncDepBlock
reorder/remove arguments of ImportDepBlock, AMDRequireDepBlock, RequireEnsureDepBlock
2018-10-17 23:07:01 +02:00
Tobias Koppers bbedceaa16 add error class for restore errors 2018-10-17 22:54:07 +02:00
Tobias Koppers e6f11c96be fix deserializing of RequireResolveHeaderDependency 2018-10-17 22:17:19 +02:00
Tobias Koppers 7786a6a0ed fix serializing of Buffers 2018-10-17 22:16:15 +02:00
Tobias Koppers 6b0da68ed9 run all test cases with caching 2018-10-17 22:15:46 +02:00
Bazyli Brzóska 3352b24059 fix extra space 2018-10-17 22:14:25 +02:00
Tobias Koppers 1500a9da5c refactor LocalModule to remove module reference to allow serializing 2018-10-17 21:25:46 +02:00
Tobias Koppers b93ba710df add error for circular references while serializing 2018-10-17 21:25:46 +02:00
Michael Ciniawsky 6c172166e3 feat(WebAssemblyImportDependency): make serializable 2018-10-17 21:25:45 +02:00
Michael Ciniawsky 095e2c9b56 feat(WebAssemblyExportImportedDependency): make serializable 2018-10-17 21:25:45 +02:00
Michael Ciniawsky 9f4e9931d1 feat(UnsupportedDependency): make serializable 2018-10-17 21:25:45 +02:00
Michael Ciniawsky 2b0d8b1dac feat(RequireResolveHeaderDependency): make serializable 2018-10-17 21:25:45 +02:00
Michael Ciniawsky e45aad79ae feat(RequireResolveDependency): make serializable 2018-10-17 21:25:45 +02:00
Michael Ciniawsky aeb1df2280 feat(RequireResolveContextDependency): make serializable 2018-10-17 21:25:45 +02:00
Michael Ciniawsky f6f49a39ff feat(RequireIncludeDependency): make serializable 2018-10-17 21:25:45 +02:00
Michael Ciniawsky 38b26d6f88 feat(RequireEnsureDependency): make serializable 2018-10-17 21:25:44 +02:00
Michael Ciniawsky 944a0cc782 feat(RequireContextDependency): make serializable 2018-10-17 21:25:44 +02:00
Michael Ciniawsky 9ea49b2a05 feat(LocalModuleDependency): make serializable 2018-10-17 21:25:44 +02:00
Michael Ciniawsky 65517658af feat(LocalModule): make serializable 2018-10-17 21:25:44 +02:00
Michael Ciniawsky 85adac8240 feat(ImportWeakDependency): make serializable 2018-10-17 21:25:44 +02:00
Michael Ciniawsky e738d4c038 feat(ImportEagerDependency): make serializable 2018-10-17 21:25:44 +02:00
Michael Ciniawsky d91946038c feat(ImportDependency): make serializable 2018-10-17 21:25:44 +02:00
Michael Ciniawsky af31196f88 feat(ImportContextDependency): make serializable 2018-10-17 21:25:44 +02:00
Michael Ciniawsky e144c58142 feat(HarmonyExportImportedSpecifierDependency): make serializable 2018-10-17 21:25:43 +02:00
Michael Ciniawsky d5c9069e64 feat(DllEntryDependency): make serializable 2018-10-17 21:25:43 +02:00
Michael Ciniawsky 145c46ff36 feat(DelegatedExportsDependency): make serializable 2018-10-17 21:25:43 +02:00
Michael Ciniawsky 689bd0efbc feat(ContextElementDependency): make serializable 2018-10-17 21:25:43 +02:00
Michael Ciniawsky 27f4c9f90e feat(ContextDependency): make serializable 2018-10-17 21:25:43 +02:00
Michael Ciniawsky b077f361b8 feat(CommonJsRequireContextDependency): make serializable 2018-10-17 21:25:43 +02:00
Michael Ciniawsky 9fc7e6de1e feat(CachedConstDependency): make serializable 2018-10-17 21:25:43 +02:00
Michael Ciniawsky ef42e11376 feat(AMDRequireItemDependency): make serializable 2018-10-17 21:25:42 +02:00
Michael Ciniawsky fe57b346bb feat(AMDRequireDependency): make serializable 2018-10-17 21:25:42 +02:00
Michael Ciniawsky 9c8392bbb0 feat(AMDRequireContextDependency): make serializable 2018-10-17 21:25:42 +02:00
Michael Ciniawsky 3954ed107a feat(AMDRequireArrayDependency): make serializable 2018-10-17 21:25:42 +02:00
Michael Ciniawsky 5e2a47e75f feat(ModuleHotDeclineDependency): make serializable 2018-10-17 21:25:42 +02:00
Michael Ciniawsky 2c56940a06 feat(ModuleHotAcceptDependency): make serializable 2018-10-17 21:25:42 +02:00
Michael Ciniawsky 7f4e1ffe6f feat(JsonExportsDependency): make serializable 2018-10-17 21:25:42 +02:00
Michael Ciniawsky 9b32ca1b16 feat(HarmonyAcceptImportDependency): make serializable 2018-10-17 21:25:42 +02:00
Michael Ciniawsky e44412d3bb feat(HarmonyAcceptDependency): make serializable 2018-10-17 21:25:41 +02:00
Michael Ciniawsky 0ebf871e25 feat(registerExternalSerializer): add SourceMapSource support 2018-10-17 21:25:41 +02:00
Tobias Koppers a09b9a5b8f refactor call and callArgs for HarmonyImportSpecifierDependency 2018-10-17 21:25:41 +02:00
Tobias Koppers 459fef0263 fix warning stack for failed module 2018-10-17 21:25:41 +02:00
Tobias Koppers 2cfbea35bc fix bug with too long short strings 2018-10-17 21:25:41 +02:00
Tobias Koppers d2f1484914 no need to create cache directory before build 2018-10-17 21:25:41 +02:00
Tobias Koppers 7b85f99a97 improve loglevel option 2018-10-17 21:25:41 +02:00
Tobias Koppers a9554a70e6 skip reference for empty strings 2018-10-17 21:25:40 +02:00
Tobias Koppers b536fe7aee default cache.name to name + mode 2018-10-17 21:25:40 +02:00
Tobias Koppers e1adc52745 improve length of emitted cache files 2018-10-17 21:25:40 +02:00
Tobias Koppers 3e05206b6d improved error messages for failed deserialization 2018-10-17 21:25:40 +02:00
Tobias Koppers a852828279 add persistent caching prototype 2018-10-17 21:25:39 +02:00
Tobias Koppers 518104b3fb Merge tag 'v4.21.0' into next
4.21.0
2018-10-17 20:38:00 +02:00
Zhibin Liu 257e6ec8d6 [ConstPlugin] add support for logical expressions (&& and ||) 2018-10-17 23:12:07 +08:00
Tobias Koppers 7bc5c98171 Merge branch 'master' into marcusdarmstrong-external-module-fix 2018-10-17 16:13:55 +02:00
Tobias Koppers 0e232a926c
Merge pull request #8170 from webpack/refactor/cache2
refactor cache to be more generic and usable for other things
2018-10-17 10:47:06 +02:00
Tobias Koppers 44e890e25b
Merge pull request #8179 from webpack/refactor/moduleIndex
Rename index/index2 to pre/postOrderIndices
2018-10-17 10:45:52 +02:00
Tobias Koppers 83538ebc54
Merge pull request #8178 from webpack/feature/moduleIds
Remove moduleIds=total-size and deprecate moduleIds=hashed
2018-10-17 10:04:11 +02:00
Florent Cailhol 7db1d0ce4b Remove IgnorePlugin compat layer 2018-10-12 18:10:12 +02:00
Florent Cailhol 7777b2f6b3 Update EnvironmentPlugin TODO comment 2018-10-12 18:03:03 +02:00
Florent Cailhol ef367db2cc Remove ContextDependency#prepend 2018-10-12 17:59:26 +02:00
Florent Cailhol d311847a05 Remove Compilation#performance 2018-10-12 17:57:10 +02:00
Florent Cailhol d5636b32d2 Rename index/index2 to pre/postOrderIndices
Also remove useless TODO
2018-10-12 17:51:28 +02:00
Florent Cailhol 7669104f71 Deprecate moduleIds=hashed in favor of moduleIds=deterministic
Also remove moduleIds=total-size
2018-10-12 17:14:16 +02:00
Tobias Koppers 9b8d26f6e8 refactor cache to be more generic and usable for other things 2018-10-11 10:46:48 +02:00
Michael Loughry 👨‍💻 1d71ede475 Make changes suggested by @sokra to optimize chunk graph generation 2018-10-04 16:10:12 -07:00
Naveen Marella 014042605f Removed unnecessary change on passed object. 2018-10-04 09:49:43 -06:00
Naveen Marella 71f9230383 Adding format option for Dll Plugin to get a formatted manifest json. 2018-10-03 09:48:29 -06:00
Tobias Koppers 9fe42e7c40
Merge pull request #8118 from webpack/bugfix/issue-8110
fixes #8110
2018-10-02 16:43:33 +02:00
Tobias Koppers 9da00cdb42 fixes #8110 2018-10-02 14:52:52 +02:00
Tobias Koppers 3e74cb428a
Merge pull request #8122 from dthpth/bugfix/output-library-array
fix output for 'output.library: string[]' configuration
2018-10-02 14:48:51 +02:00
Michael Ciniawsky 7f746a955a chore(JavascriptParser): update `acorn` dependencies
package: update `acorn` v5.6.2...v6.0.0
package: update `acorn-dynamic-import` v3.0.0...v4.0.0
2018-10-02 14:20:20 +02:00
Sergey Vershinin 8a939328f9 fix output for 'output.library: string[]' configuration 2018-10-01 22:31:26 +03:00
Steven 2caeea0f4d
Add if statement 2018-10-01 07:52:43 -04:00
Tobias Koppers 25e8b78889
Merge pull request #8100 from webpack/refactor/cache
Refactor cache
2018-10-01 10:49:35 +02:00
Steven 47a35a5f03 Make prettier 2018-09-29 20:18:26 -04:00
Steven a1fd3042a5 Refactor crossOriginLoading 2018-09-29 20:11:20 -04:00
Steven b939f617ac
Remove unused variable: $crossOriginLoading$ 2018-09-29 12:54:25 -04:00
Tobias Koppers ae72fe3724 fixes timestamp transfer from watcher 2018-09-27 21:28:07 +02:00
Tobias Koppers 6d09410a26 remove parserScope
it's not serializable and not needed anyway
2018-09-27 13:40:58 +02:00
Tobias Koppers 5f1a30d2ef fixup: AsyncQueue 2018-09-27 13:20:23 +02:00
Tobias Koppers 7340fbb547 refactor Cache
add a new hookable Cache class
removed CachePlugin
add MemoryCachePlugin
refactor timestamps
create FileSystemInfo class
2018-09-27 13:20:19 +02:00
Tobias Koppers f31a8c231b add compilerPath (will be later used to access the cache) 2018-09-27 11:21:17 +02:00
Tobias Koppers 46232fab31 make Compilation.addModule async and queued 2018-09-27 11:21:11 +02:00
Tobias Koppers 52634e7a2d remove cacheGroup argument from addModule 2018-09-27 11:21:06 +02:00
Tobias Koppers 4eab41bd5f refactor Module.needBuild to be async 2018-09-27 11:20:54 +02:00
Tobias Koppers 554b417546 Modules are responsible for sorting of dependencies 2018-09-27 11:20:42 +02:00
Eemeli Aro c0a619abe3 Use a single options argument for AmdMainTemplatePlugin 2018-09-27 08:01:17 +03:00
Eemeli Aro b624d167a5 Add "amd-require" libraryTarget, resulting in a require() wrapper 2018-09-26 21:46:16 +03:00
Tobias Koppers 4f1905aa5a Merge tag 'v4.20.2' into next
4.20.2
2018-09-25 23:13:58 +02:00
Tobias Koppers aab3afbef8 fixes #8085 2018-09-25 21:52:03 +02:00
Tobias Koppers dece2e69e3 Merge tag 'v4.20.1' into next
4.20.1
2018-09-25 16:21:39 +02:00
Tobias Koppers 17044bf9c6 Merge tag 'v4.20.0' into next
4.20.0
2018-09-25 16:20:42 +02:00
Tobias Koppers d836bcb027 fixes #8081 2018-09-25 14:45:30 +02:00
Tobias Koppers 1495b33102
Merge pull request #8070 from chuckdumont/work
Uncaught exception from renderers
2018-09-22 09:50:37 +02:00
Tim Neutkens 2671d88b37 Fix typo 2018-09-21 23:24:18 +02:00
Chuck Dumont f8877e0819 Uncaught exception from renderers 2018-09-21 14:42:25 -04:00
Tobias Koppers c7681825f8 fix issues with absolutePath, allOf and anyOf
make DllReferencePlugin schema more expressive
typing fixes
2018-09-21 11:04:36 +02:00
Tobias Koppers 1f6b92de3e use declarations from schemas in plugins 2018-09-21 11:04:28 +02:00
Tobias Koppers d48975c948 use types from schema 2018-09-21 11:04:19 +02:00
Tobias Koppers 56c613a669 add moduleIds deterministic for simpler long term caching 2018-09-18 17:49:19 +02:00
Tobias Koppers 19d60ba0cd Merge tag 'v4.19.1' into next
4.19.1
2018-09-18 10:13:54 +02:00
Tobias Koppers 62e01d3cae add some random types 2018-09-18 09:54:35 +02:00
Tobias Koppers 162ed5f382 add some missing types for validation 2018-09-18 09:53:27 +02:00
Tobias Koppers ab284977c3
Merge pull request #8043 from RubenVerborgh/externals-object-array
Allow array as value in externals object
2018-09-18 09:42:43 +02:00
Tobias Koppers f0271d93c6 fix ExternalModule and test case 2018-09-18 09:10:14 +02:00
Tobias Koppers e08f71c0ef keep/restore comments in export default
fixes #8039
2018-09-17 14:58:55 +02:00
Sharang Dashputre bb4c2d18f7 Correctly set the 'browser' value for electron-renderer 2018-09-16 18:30:24 +05:30
Tobias Koppers 5ade574510
Merge pull request #7947 from philipwalton/mjs-sourcemap-support
Add sourcemap support for .mjs output files
2018-09-15 21:45:31 +02:00
Ed Morley 79910c6ba5 Switch from uglifyjs-webpack-plugin to terser-webpack-plugin
Some history:
* `uglifyjs-webpack-plugin` < v1.0 used the minifier `uglify-js`
* however `uglify-js` does not support ES6, which resulted in a fork
  called `uglify-es` that was developed in the `uglify-js` repository,
  but under the `harmony` branch
* `uglifyjs-webpack-plugin` v1.x switched to `uglify-es` for ES6 support
* however `uglify-es` stopped being maintained:
  https://github.com/mishoo/UglifyJS2/issues/3156#issuecomment-392943058
* which led to a fork called `terser` that has incorporated all of
  the unmerged PRs and will be where all new development occurs:
  https://github.com/fabiosantoscode/terser
* `terser-webpack-plugin` was created, which is the `terser` equivalent
  of `uglifyjs-webpack-plugin`:
  https://github.com/webpack-contrib/terser-webpack-plugin
* `uglifyjs-webpack-plugin` v2.x will be switching back to `uglify-js`,
  so any project that needs to support ES6 now needs to switch to
  `terser-webpack-plugin`.

Fixes #7923.
2018-09-15 12:29:14 +01:00
Tobias Koppers 97ed999aad Merge tag 'v4.19.0' into next
4.19.0

* Separate context for renderBoostrap and hooks
* Remove ModuleTemplate from MainTemplate.bootstrap hook
2018-09-15 13:10:58 +02:00
OJ Kwon 2df7b0c1cf
fix(nodemaintemplate): resolve async chunk path platform agnostic 2018-09-14 11:22:08 -07:00
Tobias Koppers 13b2cdd5ae hash content of bootstrap code
instead of trying to calculate it
from inputs

fixes #8027
fixes #7984
2018-09-13 23:25:26 +02:00
Tobias Koppers 6dc4b5c876
Merge pull request #8017 from webpack/refactor/compilation
Refactor compilation
2018-09-12 14:57:31 +02:00
Tobias Koppers 5b4cbb5ee0 add queues to Compilation
remove Semaphore and use AsyncQueue instead
deprecate Module.needRebuild, add Module.needBuild
remove Module.unbuild
add Module.invalidateBuild
2018-09-12 13:17:03 +02:00
Tobias Koppers d48a331642 Split Compilation process in multiple methods 2018-09-12 13:17:02 +02:00
Tobias Koppers b098789625 remove recursive flag 2018-09-12 13:17:00 +02:00
Tobias Koppers 3c244d9fc9 Optimize error origin handling and module trace
Improve warnings and errors sorting
2018-09-12 13:16:59 +02:00
Tobias Koppers 9522ad72b3 make deprecations less noisy 2018-09-12 13:13:55 +02:00
Tobias Koppers fd0b6aa196 Merge tag 'v4.18.0' into next
4.18.0
2018-09-10 17:44:07 +02:00
Tobias Koppers e0e0061f32 Merge branch 'master' into chore-bump-webassemblyjs11 2018-09-10 15:18:38 +02:00
Florent Cailhol f75027475b Move HMR hotBoostrap hook 2018-09-07 14:14:10 +02:00
Tobias Koppers 7a43a27eda make Compilation.chunks a Set 2018-09-06 17:04:01 +02:00
Tobias Koppers 6ca7ae1c48 make Compilation.modules a Set 2018-09-06 17:03:24 +02:00
Tobias Koppers 4a959b8b83 improve SetHelpers typings 2018-09-06 17:02:20 +02:00
Tobias Koppers f47febd045 add deprecation helpers 2018-09-06 17:02:19 +02:00
Tobias Koppers 9da6003362 Make usedIds in records an array
Make emitted JSON for records stable
2018-09-06 16:05:29 +02:00
Tobias Koppers 0eafdffd0e Stabilize stats item order 2018-09-06 16:05:26 +02:00
Tobias Koppers 149043a134 Make create chunk and module ids filename safe 2018-09-05 21:29:22 +02:00
Tobias Koppers b4860ccebb refactor chunk id plugins 2018-09-05 14:28:52 +02:00
Tobias Koppers 4a7a85ca84 rename index/index2 to pre/postOrderIndex 2018-09-04 09:27:25 +02:00
Tobias Koppers 24185b5ee2 filter modules before sorting for performance reasons 2018-09-04 08:52:22 +02:00
Tobias Koppers 4d7b5b3b5e Refactor module id plugins to be independent 2018-09-03 20:45:44 +02:00
Tobias Koppers bd18e019d4 Clone module attributes instead of moving them 2018-09-03 20:12:55 +02:00
Florent Cailhol 8fda6a562e Add NaturalModuleIdsPlugin 2018-09-03 20:12:55 +02:00
Tobias Koppers 888ad3d684 insert concatenated module at correct position
fixes bug where ids are incorrectly assigned
2018-09-03 20:12:55 +02:00
Tobias Koppers 51a13926ad Merge tag 'v4.17.2' into next
4.17.2
2018-09-03 20:06:19 +02:00
Tobias Koppers 8c8719bd4a
Merge pull request #7954 from webpack/feature/split-chunk-type
add moduleType option to cacheGroup to select by module type
2018-09-03 19:13:26 +02:00
Tobias Koppers 41e59235df emit error when splitChunks.name points to existing chunk name 2018-09-03 10:37:43 +02:00
Tobias Koppers b87e93221b add type option to cacheGroup to select by module type 2018-09-03 10:36:24 +02:00
Tobias Koppers 604460da52 move iterable compare code to comparators 2018-08-28 15:10:30 +02:00
Tobias Koppers b669bec324 add caching to higher-order comparators 2018-08-28 15:09:09 +02:00
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
aimergenge 7996883cab
solving outputing unnecessary spaces
`…` is causing terminals like git bash on windows to output unnecessary spaces
2018-08-28 16:09:21 +08:00
Tobias Koppers 239ce7fcd9 Use ChunkGraph instead of Compilation in updateHash 2018-08-24 12:02:42 +02:00
Philip Walton 12762ff37f Add sourcemap support for .mjs output files 2018-08-23 11:10:46 -07:00
Tobias Koppers 402cf189ce use JavascriptModulesPluginHooks.shouldRender correctly 2018-08-23 16:54:41 +02:00
Tobias Koppers 670502fc81 Move AsyncDependenciesBlock.chunkGroup into ChunkGraph 2018-08-22 20:17:49 +02:00
Tobias Koppers 3aa2280498 move Module.hash and .renderedHash into ChunkGraph 2018-08-22 19:24:54 +02:00
Tobias Koppers eb63cf80d6 move built flag into Compilation 2018-08-22 15:33:16 +02:00
Tobias Koppers e0f84652c0 remove Module.prefetched
remove prefeteched from Stats
make Compilation.addModuleChain public and remove onModule argument
remove Compilation.prefetch
2018-08-22 15:19:05 +02:00
Tobias Koppers b20556c1ff move profile to ModuleGraph 2018-08-22 14:54:28 +02:00
Tobias Koppers 4135c6e683 remove some unnecessary moduleGraph arguments and property accesses 2018-08-22 12:45:14 +02:00
Tobias Koppers 26022c86a0 move Module.depth into ModuleGraph
nested modules no longer have depth and stay unsorted in stats
2018-08-22 12:45:11 +02:00
Tobias Koppers fe54d717a2 refactor sorting in Stats 2018-08-22 12:45:08 +02:00
Tobias Koppers a92c23ef76 fixes #7930 2018-08-22 11:11:37 +02:00
Tobias Koppers 5a78e96dc9 add backward-compat layer for ModuleGraph and ChunkGraph 2018-08-21 16:17:02 +02:00
Tobias Koppers 42167db4af move Module.index and index2 into ModuleGraph 2018-08-21 16:16:51 +02:00
Tobias Koppers 4dfe88edb0 add moduleGraph argument to comparators 2018-08-21 11:08:07 +02:00
Tobias Koppers 0f1f69a9d6 hide id overriding in HarmonyImportSpecifierDependency 2018-08-21 11:06:59 +02:00
Tobias Koppers a875ddba5b refactor ModuleGraph to use internal dependency 2018-08-21 11:06:00 +02:00
Tobias Koppers 3bb5263bfd move methods from Module into ModuleGraph 2018-08-21 11:04:40 +02:00
Tobias Koppers c21d59f783 Merge tag 'v4.17.0' into next
4.17.0
2018-08-21 11:02:16 +02:00
Tobias Koppers 45e798af68
Merge pull request #7827 from AoDev/feat/ignore-plugin-check-fn
feat(IgnorePlugin): allow user to provide his own check functions
2018-08-21 10:24:32 +02:00
Tobias Koppers ed9691585e
Merge pull request #7907 from Connormiha/simplify-context-replacmnet-plugin
Get rid of typeof for checking undefined
2018-08-21 10:21:29 +02:00
Mihail Bodrov 1f954b4f12 Get rid typeof undef in all lib 2018-08-21 03:26:50 +03:00
Tobias Koppers c2e03951f4
Merge pull request #7922 from webpack/bugfix/concat-globals
fix exporting globals in scope-hoisted modules
2018-08-20 18:09:37 +02:00
Tobias Koppers 9315ce29aa fix exporting globals in scope-hoisted modules
fixes #7905
2018-08-20 10:54:05 +02:00
Tobias Koppers c253b4b130 chunk ids contribute to contenthash for javascript
fixes #7915
2018-08-20 10:04:33 +02:00
Mihail Bodrov efa69cd628 Get rid of typeof for checking undefined 2018-08-17 00:49:30 +03:00
Florent Cailhol a61778aad4 Change stage values 2018-08-16 14:10:55 +02:00