Commit Graph

200 Commits

Author SHA1 Message Date
Tobias Koppers f263359fd8 use output.importMetaName for import.meta 2020-09-18 10:55:37 +02:00
Tobias Koppers 4dc04d1971 Merge branch 'master' into dynamically-resolve-public-path 2020-09-18 10:40:39 +02:00
Tobias Koppers aadc15e740 update enhanced-resolve for
- imports field support
- resolve.fallback option

recommend resolve.fallback for polyfills
2020-09-16 07:28:32 +02:00
Ivan Kopeykin 580de0873a update publicPath
- support option output.publicPath="auto"
- add test cases
- render import.meta.url for output.scriptType="module"
2020-09-15 00:27:38 +03:00
Tobias Koppers bbdb33a5cf rename output.environment.import -> output.environment.dynamicImport 2020-09-11 23:11:02 +02:00
Tobias Koppers 7e85649492 improve target options
infer target properties from different targets and fill defaults from that

custom targets can now be created via `target: false` and a plugin (similar to the other options)

add stubs from universal chunk/wasm loading and module chunk format

add externalsPresets.electron and externalsPresets.electronRenderer

node.__file/dirname: "eval-only"
2020-09-10 11:42:09 +02:00
Tobias Koppers 48010fb955 replace output.ecmaVersion with output.environment and more detailed flags 2020-09-10 11:12:28 +02:00
Tobias Koppers 730aefef37
Merge pull request #11412 from webpack/experiments/enable-mjs
enable mjs experiment
2020-09-10 10:57:36 +02:00
Tobias Koppers 817c1bf9c7 move default externals from target into externalsPresets option 2020-09-09 15:18:59 +02:00
Tobias Koppers aa67a435a4 refactor wasm loading from target into output.wasmLoading option
allow entry specific wasm loading
2020-09-09 11:20:37 +02:00
Tobias Koppers ed06a7f83a new Worker() support
add support for async anonymous entrypoints from inside the codebase
add worker example
move entry options into Entrypoint and receive them from there
2020-09-08 07:37:20 +02:00
Tobias Koppers 2d4c9da6a6 enable mjs experiment 2020-09-07 23:15:24 +02:00
Tobias Koppers 0afc6a7f48 print entrypoint only when necessary (stats.entrypoints: "auto")
show sizes for entrypoints
2020-09-03 23:29:14 +02:00
Tobias Koppers 8e0c511068 replace hash, version, time and builtAt with build summary at the bottom 2020-09-03 22:12:52 +02:00
Tobias Koppers ce97f40bb7 update test case for changed stats format
fix bug with groupModulesByType flag
rename stats.runtime to stats.runtimeModules
2020-09-02 10:51:10 +02:00
Tobias Koppers 5282f878a1 fix groupModulesByAttributes description 2020-09-01 20:52:36 +02:00
Tobias Koppers 8904dd7b91 rename groupAssetsByStatus to groupAssetsByEmitStatus 2020-09-01 20:52:34 +02:00
Tobias Koppers be021e00f4 add grouping of modules 2020-09-01 18:31:22 +02:00
Tobias Koppers 3ea9400505 add grouping of assets 2020-09-01 18:16:43 +02:00
Tobias Koppers 7381cc0536 move baseUri into chunk loading runtime modules 2020-08-29 01:59:39 +02:00
Tobias Koppers 312e2ab587 Merge branch 'master' into feature/asset-url 2020-08-28 20:54:50 +02:00
Tobias Koppers a7e86c791c remove chunkCallbackName, update snapshots 2020-08-28 10:59:40 +02:00
Tobias Koppers 07d863e14c implement enabledChunkLoadingTypes approach
allow chunkLoading per entry
allow custom library/chunkLoading types
2020-08-28 10:59:37 +02:00
Tobias Koppers d69fadf8e8 add output.chunkLoading option to control chunk loading plugins 2020-08-28 10:58:04 +02:00
Tobias Koppers 805d26b0ae unify config options for jsonpFunction and chunkLoadFunction to chunkLoadingGlobal
rename hotUpdateFunction to hotUpdateGlobal
2020-08-28 10:58:00 +02:00
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 db36afea4d
Merge pull request #11333 from chenxsan/feature/output-charset
add output.charset option
2020-08-19 15:01:06 +02:00
Tobias Koppers b929d4cdce calculate real content hash for assets after asset processing 2020-08-18 22:07:24 +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
chenxsan fd19fa90b8 add output.charset option 2020-08-17 20:25:27 +08:00
Ivan Kopeykin 4157166263 Merge branch 'master' into feature/asset-url
# Conflicts:
#	test/Defaults.unittest.js
2020-08-16 15:47:05 +03:00
Ivan Kopeykin f659974405 add output.baseURI option, add test case for it 2020-08-16 12:34:40 +03:00
Tobias Koppers d95fa3da6d need to check dependency when applying loaders for normal imports 2020-08-08 11:29:09 +02:00
Ivan Kopeykin ddc83b0d70 feat: url assets 2020-08-05 00:55:38 +03: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
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 4c3216efad add size optimization mode to `optimization.mangleExports` 2020-07-31 12:54:38 +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
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 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
Tobias Koppers 0d857e3942 Improve cleverMerge to respect byDependency order correctly
Allow to use "..." in `option.resolve` too
Add "..." to schema when needed

Apply dependency specific mainFields, aliasFields and conditionNames only
for cjs and esm dependencies or when none is specified for backward-compat.
2020-07-15 14:13:31 +02:00
Tobias Koppers 6014ca7e86 splitChunks improvements
add new splitChunks.enforceSizeThreshold option
enforces splitting on certain size (ignoring maxRequests and minRemainingSize)

reduce default for splitChunks.minSize to 20k
set default for splitChunks.enforceSizeThreshold to 50k

fix bug where sorting didn't work for minSize: 0
2020-07-13 10:12:17 +02:00
Tobias Koppers 71ec6adf3b Improve description in config schema 2020-07-09 09:41:31 +02:00
Ivan Kopeykin 38779b85ee add roots option 2020-07-09 00:17:57 +03:00
Tobias Koppers 1bb02df61e
Merge pull request #11095 from vankop/support-url-requests
Support url requests
2020-07-06 20:03:52 +02:00