Commit Graph

221 Commits

Author SHA1 Message Date
alexander.akait ff9e19809a fix: types 2024-08-07 19:14:54 +03:00
alexander.akait adf2a6b7c6 fix: a lot of types 2024-08-06 06:08:48 +03:00
alexander.akait 93743d233a refactor: code 2024-08-02 19:32:31 +03:00
alexander.akait c802a98f58 style: improve 2024-08-02 19:32:22 +03:00
alexander.akait 9943f3506a style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait 0b745968a2 style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait 500ee96dcb style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait 5725254415 style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait a592b62686 style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait 423e89b2c7 style: improve style of code 2024-08-02 19:32:13 +03:00
alexander.akait 1954237716 chore: fix lint and types 2024-06-11 16:26:12 +03:00
alexander.akait ab3e93b19e style: fix 2024-06-11 16:09:50 +03:00
alexander.akait 7b4775cebe fix(types): fix some types 2024-03-21 15:16:51 +03:00
Nitin Kumar 412ae5425e chore: udpate prettier to v3 2024-01-14 07:11:34 +05:30
alexander.akait 4809421990 refactor(types): more 2023-06-21 19:00:24 +03:00
Sean Larkin e958ac552b refactor(types): Improve module type strictness and refactor module type string usages in module subclasses 2023-05-04 23:19:11 +00:00
Sean Larkin fa4cbf11a1 add more module type constants, use them across codebase 2023-03-31 10:56:32 -07:00
Tobias Koppers 7afcc5d4ff allow to disable some deprecations
add `experiments.backCompat: false` (default in `experiments.futureDefaults`)
remove unused `experiments.asset`
enable `experiments.topLevelAwait` and `experiments.asyncWebAssembly` by default in `experiments.futureDefaults`
2021-11-05 09:54:51 +01:00
Tobias Koppers b16568a253 upgrade filename runtime module to full hash module when referencing a full hash chunk 2021-09-02 10:29:59 +02:00
Hiroki Osame 6bce75212b fix: chunkHashes typo 2021-08-03 17:51:25 -04:00
Tobias Koppers bd8af21c20 avoid generating hmr updates for previously not existing runtimes 2021-05-26 22:16:32 +02:00
Tobias Koppers b0fa9ccada pretty files 2021-05-11 09:31:46 +02:00
Tobias Koppers 404a854c8b improve hmr error handling abilities
pass module and moduleId with self error handler
add error handlers for dependency accept handlers
pass moduleId and dependencyId with dependency accept error handler
add output.strictModuleErrorHandling to opt-in into strict module error handling
HotModuleReplacementPlugin enalbed output.strictModuleErrorHandling automatically

fixes #12826
2021-03-09 20:23:00 +01:00
Tobias Koppers f25345cae9 refactor code generation and HMR plugin to generate real module hashes for HMR 2021-01-26 14:45:11 +01:00
Tobias Koppers c9fbdb9e48 avoid a breaking change and use a warning instead 2020-11-28 15:48:01 +01:00
Tobias Koppers d46f945572 fix problem when HMR and different runtimes
allow HMR to work in WebWorkers too
2020-11-28 13:53:32 +01:00
Tobias Koppers fac6c5241f add missing chunk groups to HotUpdateChunks 2020-09-25 10:53:14 +02:00
Tobias Koppers b58393fce0 fix optimization bailout for HMR dependencies 2020-09-15 12:35:58 +02:00
Tobias Koppers 12997f0a6c fix incorrect disposing of modules during HMR 2020-09-08 10:25:41 +02:00
Tobias Koppers 6b4ce6e011 improve HMR plugin with multiple runtimes 2020-07-28 14:06: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 36cf3039aa use content hashes for assets 2020-07-20 08:45:27 +02:00
Tobias Koppers 555db6a547 remove Compilation.modifyHash
refactor HMR Plugin to better support module hashes

fixes bug that causes empty HMR manifest
remove HotModuleReplacementPlugin multiStep
2020-07-09 09:02:38 +02:00
Ivan Kopeykin 4cd526f970 hmr support update
- import.meta.hot to import.meta.webpackHot
- create separate tests for import.meta.webpackHot
- remove HMRApiDependency in favor of ConstDependency
2020-06-24 17:22:28 +03:00
Ivan Kopeykin 1beb4e5707 support import.meta 2020-06-23 01:03:52 +03:00
Ivan Kopeykin 104845a419 support import.meta.hot 2020-06-22 18:49:57 +03:00
Tobias Koppers d6f6025a5a make sure that the callback function in module.hot.accept is parsed
fixes #11057
2020-06-18 15:09:08 +02:00
Tobias Koppers 49752a06a8 cleanup asset processing
deprecate writing to compilation.assets after sealing.
merge all asset processing into single hook with stages.
Deprecate additionalChunkAssets and optimizeChunkAssets.
Redirect additionalAssets, optimizeAssets to processAssets for backward-compat.
Remove finishAssets hook without deprecation as it was not in v4.
2020-05-22 10:39:21 +02:00
Tobias Koppers 50ec72a6ca use the full hash on modules that need the full hash of the compilation
use getFullHash runtime module for updating the hash in HMR
2020-04-30 17:57:01 +02:00
Tobias Koppers b9c50fdb09 fix jsdoc documentations 2020-04-28 19:42:58 +02:00
evilebottnawi 3a118ff1cf chore: setup cspell 2020-03-13 12:13:55 +03:00
Tobias Koppers 6477ca56f8 Split options defaulting in normalization and defaults
Apply defaults after plugins are applied to allow plugins to feature their own defaults.
This allows to make preset plugins.
2020-02-17 19:12:54 +01:00
Tobias Koppers b079429ec8 use correct string or number form of chunk id in HMR 2020-01-15 11:19:25 +01:00
Erik van der Bas - PC 70e9be9158 Assign fallback ChunkGraph to HotUpdateChunks 2019-12-16 13:21:39 +01:00
Tobias Koppers 497b65e122 run prettier 2019-11-15 10:56:01 +01:00
Tobias Koppers acff6ec992 move BasicEvaluatedExpression and JavascriptParserHelpers to javascript directory 2019-10-22 09:27:52 +02:00
evilebottnawi 8198ffb3e6 refactor: code 2019-10-22 00:14:05 +02:00
Tobias Koppers ddc3dae0e6 refactor Module.source() and Module.getRuntimeRequirements() into Module.codeGeneration
add code generation phase to Compilation
add `output.iife` options to remove iife wrapper
add `experiments.outputModule` which enabled `output.module`
add `output.module` which sets defaults to `output.iife: false`, `output.libraryTarget: "module"`, `output.jsonpScriptType: "module"`, `terserOptions.module: true`
add `output.module` example
improve runtime requirements needed by ConcatenatedModule
add entry inlining, which inlines entry module code into runtime scope (only when safe)
make whole bundle strict when all modules are strict
2019-10-08 23:59:48 +02:00
Tobias Koppers 53f68c9e7b update deprecated usage of chunk and main templates 2019-10-08 23:46:33 +02:00
Tobias Koppers 69a545c444 Deprecate MainTemplate, ChunkTemplate, ModuleTemplate
move logic and hooks to JavascriptModulesPlugin
2019-10-08 23:46:26 +02:00