Commit Graph

154 Commits

Author SHA1 Message Date
Tobias Koppers d6e637f33c add "snapshot" configuration to allow to configure how snapshots are created
expose snapshot options for module, resolve, buildDependencies and resolveBuildDependencies
move managedPaths and immutablePaths from config.cache to config.snapshot
add timestamp + hash snapshotting mode
use timestamp + hash mode by default in production and for buildDependencies
2020-08-26 01:27:13 +02:00
Tobias Koppers a4a5a76703 make original source in CachedSource lazy 2020-08-24 18:16:56 +02:00
Tobias Koppers cee47dc867 Store cache dependencies inside of Snapshot to reduce cache size 2020-08-24 18:16:54 +02:00
Tobias Koppers 76a6e9b90f create a class for Snapshot for faster access and smaller serialization 2020-08-24 18:16:53 +02:00
Tobias Koppers 6409463d24 only create shared snapshots for 3 or more shared entries
add logging
2020-08-24 18:16:50 +02:00
Tobias Koppers 49a28a73cf accept Source-like objects in assets and cache sources for RealContentHashPlugin 2020-08-20 09:54:59 +02:00
Tobias Koppers 0a6f2bf401 expose missing target plugins 2020-08-19 23:17:33 +02:00
Tobias Koppers 2a45cf758e export webpack-sources 2020-08-19 20:06:05 +02:00
Tobias Koppers 709e3f1788 remove unused code 2020-08-19 15:08:34 +02:00
Tobias Koppers db36afea4d
Merge pull request #11333 from chenxsan/feature/output-charset
add output.charset option
2020-08-19 15:01:06 +02:00
Tobias Koppers 48ff7043f1 add provide and mergeEtags to CacheFacade 2020-08-19 11:25:24 +02:00
Tobias Koppers b929d4cdce calculate real content hash for assets after asset processing 2020-08-18 22:07:24 +02:00
Tobias Koppers 71cf7f4dc8 add support for reexporting in CommonJS
and necessary refactoring + fixes for that
2020-08-17 21:32:47 +02:00
chenxsan 509349f7d1 fix lint 2020-08-17 21:44:32 +08:00
chenxsan 2611eb8ccc update schemas 2020-08-17 20:34:23 +08:00
Tobias Koppers 3cf8299602 add test case for conflicting named with namespace reexport
and fix problem
2020-08-13 10:59:56 +02:00
Tobias Koppers 8b91b6c508 use target info to implement side effects plugin 2020-08-12 23:20:45 +02:00
Tobias Koppers 9b80cde76c store multiple targets per ExportInfo
resolve target when reading
2020-08-12 21:41:03 +02:00
Tobias Koppers 163e7674a0 track the target binding of harmony reexports
display target binding in module info header
check conflicting star exports (fixes #7562) when statically known
2020-08-11 20:13:01 +02:00
Tobias Koppers fcf2647019
Merge pull request #11257 from webpack/chore/todos-to-defined-types
add more types
2020-08-07 19:29:32 +02:00
Tobias Koppers 792ce1d6a6
Merge pull request #11221 from webpack/feature/optional-chaining
Feature/optional chaining
2020-08-07 19:24:01 +02:00
Ivan Kopeykin 18ae4d16d8 add evaluation to optional chaining 2020-08-07 14:43:40 +02:00
Ivan Kopeykin dfdc554b80 add optional chaining support 2020-08-07 14:43:39 +02:00
Ivan Kopeykin 8cf511dc94 Merge branch 'master' into chore/todos-to-defined-types 2020-08-06 22:48:20 +03:00
Tobias Koppers 84aeac5c92 add Compilation.deleteAsset 2020-08-06 09:55:18 +02:00
Tobias Koppers 1273b9eb96
Merge pull request #11267 from webpack/experiments/import-async
enable experiments.importAsync by default
2020-08-04 16:00:00 +02:00
Tobias Koppers dfc8e35f2d enable experiments.importAsync by default
remove experiments.importAwait
2020-08-04 00:47:08 +02:00
Nitin Kumar ddaa68e198 fix: optimization.emitOnErrors description 2020-08-03 15:11:54 +05:30
Ivan Kopeykin 4fc44a3398 add more types 2020-08-02 23:47:54 +03:00
Tobias Koppers d0ef2ce43f display assets in stats in a list instead of a table
group related assets below the parent asset
2020-08-02 08:07:32 +02:00
Tobias Koppers f5bd6216aa add related info to asset info 2020-08-02 07:36:05 +02:00
Tobias Koppers ca369f23c5 do cache related tasks after calling handler in watching
improve progress output
2020-08-01 09:00:17 +02:00
Tobias Koppers 4c3216efad add size optimization mode to `optimization.mangleExports` 2020-07-31 12:54:38 +02:00
Tobias Koppers a4f17775b1 fix dependOn behavior with runtimes, fix runtime passing by entry 2020-07-30 11:18:09 +02:00
Tobias Koppers 77cdce7393 remove unused methods, improve code coverage 2020-07-29 11:14:26 +02:00
Tobias Koppers 8948263db8 avoid using getChunkModuleMaps as it doesn't support different modules per runtime 2020-07-28 17:16:32 +02:00
Tobias Koppers 1265765141 polish, types 2020-07-27 22:41:04 +02:00
Tobias Koppers e16bdfda6c refactor used exports analysis, hashing, code generation, optimizations
to keep track of runtimes, used exports depending on runtime

modules can have different hashes and generated code depending on runtime
chunks are only considered as equal for MergeDuplicateChunks and SplitChunks when exports used in contained modules are equal
added `optimization.usedExports: "global"` to opt-out from used exports analysis per runtime
added `splitChunks.usedExports` and `splitChunks.cacheGroups[x].usedExports` to enable/disable used exports comparing for modules
`splitChunks.usedExports` defaults to `true` in production
2020-07-27 22:40:44 +02:00
Tobias Koppers b3466e996b add entry[x].runtime option to allow runtime chunk per entry 2020-07-27 22:40:40 +02:00
Ivan Kopeykin 60619d2a41 fix lint 2020-07-22 23:05:26 +03:00
Ivan Kopeykin bd858f0d30 add more types 2020-07-22 19:58:08 +03:00
Tobias Koppers c8aff62228 improve handling of side effects with evaluation 2020-07-21 13:00:25 +02:00
Tobias Koppers bc1c5a8f23 refactor evaluation logic 2020-07-21 10:30:12 +02:00
Ivan Kopeykin 5ec7dfd6ac refactor equality comparison, support nullish coalescing in ConstPlugin
- add handleStrictEqualityComparison callback
- add handleAbstractEqualityComparison callback
- rework evaluateIdentifier interface
- add tests
2020-07-21 10:30:10 +02:00
Ivan Kopeykin 3ecc87889c add nullish coalescing support 2020-07-21 10:30:08 +02:00
Tobias Koppers 1179a3eaab
Merge pull request #11188 from webpack/feature/mjs
improve compatibly with node.js ESM
2020-07-20 12:18:21 +02:00
Tobias Koppers 4786a7ec61
Merge pull request #11191 from webpack/bugfix/asset-hash
use content hashes for assets
2020-07-20 10:18:54 +02:00
Tobias Koppers 36cf3039aa use content hashes for assets 2020-07-20 08:45:27 +02:00
Tobias Koppers f65adade96 deprecate optimization.noEmitOnErrors in favor of optimization.emitOnErrors 2020-07-20 08:40:31 +02:00
Tobias Koppers 205bbb4c0d improve compatibly with node.js ESM
improve experiments.mjs to be more compatibly with node.js ESM
  - add support for `type: "module"` in package.json
  - add support for `*.cjs`
  - enable strict ESM for data uris with `text/javascript` or `application/javascript`
  - disallow not fully specified requests in imports `*.mjs` or `type: "module"`

add `descriptionData` rule condition to match package.json info
fix passing resolveOptions along context modules
2020-07-17 13:58:29 +02:00