Peter Goldberg
47564af25a
tweak
2023-08-21 00:41:23 -04:00
Peter Goldberg
c0fde48909
fix bug in `SideEffectsFlagPlugin` with namespace re-exports
2023-08-21 00:41:22 -04:00
alexander.akait
e381884115
refactor(types): more
2023-06-21 19:00:24 +03:00
alexander.akait
4809421990
refactor(types): more
2023-06-21 19:00:24 +03:00
YunfeiHe
03fd7dca11
feat: support passing `RegExp` to `splitChunks.chunks`
2023-06-06 11:33:34 +08:00
alexander.akait
a27db31048
refactor: types fix
2023-06-05 03:14:09 +03:00
alexander.akait
ab47c696a4
refactor(types): more
2023-06-03 20:52:25 +03:00
Sean Larkin
80284ceb5d
Merge pull request #17233 from webpack/fix-16763
...
fix: handle class name in properties and methods
2023-05-24 07:18:13 -07:00
alexander.akait
4474dc4307
fix: inner graph
2023-05-24 00:29:08 +03:00
alexander.akait
d1c4e61022
fix: inner graph
2023-05-24 00:29:06 +03:00
Burhanuddin Udaipurwala
8d8a0e0e56
refactor: use global constant instead of string literal
2023-05-19 21:25:47 +05:30
Ben Worline
19b46355fc
fix import ordering
2023-05-04 21:36:03 -07:00
Ben Worline
2b2fed5880
Initial take
2023-05-04 20:41:15 -07:00
alexander.akait
02590bfdc7
chore: improve types
2023-04-21 19:22:33 +03:00
Sean Larkin
fa4cbf11a1
add more module type constants, use them across codebase
2023-03-31 10:56:32 -07:00
Ryan Wilson-Perkin
52b1b0e4ad
Revert "Improve performance of hashRegExp lookup"
2023-03-10 10:04:26 -05:00
Sean Larkin
710eaf4dda
Merge pull request #16789 from dmichon-msft/contenthash-hashsalt
...
Respect output.hashSalt in RealContentHashPlugin
2023-03-08 10:59:00 -08:00
David Michon
07283fabc4
Respect output.hashSalt in RealContentHashPlugin
...
Fix #16788
Update RealContentHashPlugin to initialize hash instances with
the value of `output.hashSalt`, if provided.
2023-03-07 16:15:36 -08:00
Ryan Wilson-Perkin
cfdb1dfe59
Improve performance of hashRegExp lookup
...
For applications with a very large number of assets, the cost of
invoking a single regular expression with many many values in a group
becomes very high.
By changing to a list of regular expressions (with helper methods for
maintaining the original design) we can get a large performance
improvement.
2023-02-24 16:17:15 -05:00
Yehor Lvivski
d4b1d69ef0
Initialize hash conditionally
2022-11-19 12:48:50 +01:00
Ivan Kopeykin
647faec2bf
make imports order deterministic
2022-05-27 14:22:05 +03:00
Ivan Kopeykin
0d408d1c7f
fix modules concatenation with importModule usage
2022-04-19 14:34:00 +03:00
Tobias Koppers
cb639b3efc
Merge pull request #15624 from webpack/add-warning-when-cache-unaffected-and-concat-modules
...
throw error when using module concatenation and cacheUnaffected
2022-04-05 08:02:40 +02:00
Ivan Kopeykin
99a5793ca8
throw error when using module concatenation and cacheUnaffected
...
optimization.concatenateModules can't be used with cacheUnaffected as module concatenation is a global effect
2022-04-04 15:37:32 +03:00
Ivan Kopeykin
3f1715f8d8
generate only needed source types
...
- in ConcatenatedModule generate only js
- in NormalModule generate only used sources
2022-03-17 13:00:39 +03:00
Ivan Kopeykin
3ec8a60f67
add ability to set module source types in chunk
2022-03-16 09:23:33 +03:00
Tobias Koppers
4951965bb1
do not inherit existing top level declarations
2022-02-14 11:53:55 +01:00
Ivan Kopeykin
58a2fd01c4
refactor top level declarations
...
- add topLevelDeclarations to code generation results
- set topLevelDeclarations=undefined if any child topLevelDeclarations=undefined
2022-02-07 17:21:36 +03:00
Ivan Kopeykin
fee6837cc7
update topLevelDeclarations for ConcatenatedModule
...
update top level declarations for ConcatenatedModule in code generation step
2022-02-04 16:05:10 +03:00
Tobias Koppers
313e416bd2
Merge branch 'main' into cspell-globs
2022-01-18 10:40:25 +01:00
Nick Schonning
a19d7991c3
chore: update cSpell globs and fix typos
2021-12-12 16:57:14 -05:00
Tobias Koppers
e67ab7fad2
resolve todos, nitpicks
2021-12-03 08:47:17 +01: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
6e50595cad
split chunks `chunks` filter also affects fallbackCacheGroup
...
add `splitChunks.fallbackCacheGroup.chunks`
2021-11-02 13:23:09 +01:00
Tobias Koppers
3d3c65f50f
add splitChunks.minSizeReduction
2021-10-19 12:35:04 +02:00
Ivan Kopeykin
27411f8f0f
add pure notations to Object calls
...
/*#__PURE__*/ notations should help minimizers to drop unused Object(...) calls
2021-10-17 11:06:14 +03:00
Tobias Koppers
3fa83c6c77
help v8 hashing the bigint
2021-10-12 09:50:13 +02:00
Tobias Koppers
1ee6f808d3
Revert "track chunk combinations for modules"
...
This reverts commit 0e13c7dea4
.
2021-10-08 15:08:48 +02:00
Tobias Koppers
643f1200c0
skip chunk conditions faster
2021-10-07 15:55:22 +02:00
Tobias Koppers
0e13c7dea4
track chunk combinations for modules
...
improves caching
improves SplitChunksPlugin
2021-10-07 15:43:27 +02:00
Tobias Koppers
da098d7872
optimization.sideEffects is compatible with cacheUnaffected
2021-10-05 16:54:51 +02:00
Tobias Koppers
91b6972144
add memCache2 for mem caching with module/chunk ids
2021-10-05 15:08:18 +02:00
Tobias Koppers
aa83e463c5
Merge pull request #14291 from webpack/feature/eval-bailouzt
...
avoid bailout of unused eval
2021-09-24 10:13:05 +02:00
Tobias Koppers
4a8bf4c084
allow to configure all hash functions used
...
fix default hash function for HttpUriPlugin to sha512
2021-09-23 14:55:13 +02:00
Tobias Koppers
18ee3fb1a9
avoid bailout of unused eval
...
expose InnerGraph and runtime utils
2021-09-20 17:40:51 +02:00
Tobias Koppers
b50d033960
allow to mangle exports of module externals
2021-09-03 13:47:09 +02:00
Daniel Diekmeier
093a9bed16
Fix spelling of `dependOn`
...
The help text suggests using `dependsOn`, but the `s` is a typo.
The correct property is called `dependOn`: https://webpack.js.org/concepts/entry-points/#entrydescription-object
2021-08-24 16:15:17 +02:00
Tobias Koppers
c76be4d738
make some things context-independent
...
* ConcatenatedModule.identifier()
* NormalModule source urls
fixes #14014
2021-08-19 14:57:39 +02:00
Tobias Koppers
0605b887c9
fix indeterminism with splitChunks.maxSize
2021-08-06 11:55:00 +02:00
Tobias Koppers
3f7d80d823
fix concatenation of module externals
...
#2933
2021-07-06 14:07:45 +02:00
Tobias Koppers
94852e07f7
allow to disable runtime chunk per entry via `runtime: false`
...
and also via `ModuleFederationPlugin`.`runtime`
2021-07-05 11:32:45 +02:00
Tobias Koppers
291321c77a
fix memory leaks
2021-06-28 09:58:03 +02:00
Tobias Koppers
4e608c8723
assign class property keys to the correct top level symbol
2021-06-21 09:48:14 +02:00
Tobias Koppers
4cf272b824
add workaround for broken eslint-scope package regarding class field support
2021-05-19 16:21:54 +02:00
Tobias Koppers
b0fa9ccada
pretty files
2021-05-11 09:31:46 +02:00
Tobias Koppers
94facd387d
add support for class fields
2021-04-27 10:28:13 +02:00
Tobias Koppers
ee24b22073
Merge pull request #13169 from janlent1/master
...
Fix deprecation message for LimitChunkCountPlugin
2021-04-19 10:34:15 +02:00
Jan Lentmaier
d88605dcbd
Fix deprecation message for LimitChunkCountPlugin
...
Just a quick test whether the issue can easily be solved
by using the chunkGraph instead of the old methods.
2021-04-18 15:54:34 +02:00
Tobias Koppers
e21b1d46fe
precompile schemas for improved startup performance
2021-04-16 16:02:58 +02:00
Tobias Koppers
18967078cb
cleanup modules after compilation to avoid leaking references when they are cached
2021-03-15 11:23:54 +01:00
Tobias Koppers
70376ad4ec
fix problem where emitting an asset twice affects the hash
2021-03-01 09:51:46 +01:00
Tobias Koppers
1ff55df486
fixes #12769
2021-02-24 12:54:17 +01:00
Tobias Koppers
f96194e0f6
storing ConcatenatedModule doesn't make sense, since it has no cachable info
...
instead the code geneneration cache will cover everything
2021-02-23 15:36:52 +01:00
Tobias Koppers
5c42b918b4
further optimizations
2021-02-23 12:03:26 +01:00
Tobias Koppers
365a362522
performance optimization
...
add statistics to ModuleConcatenationPlugin
2021-02-23 10:59:59 +01:00
Tobias Koppers
972b7f9bd1
Merge pull request #12743 from webpack/bugfix/logger-name
...
fix logger name
2021-02-22 15:43:41 +01:00
Tobias Koppers
a90d2b20f5
fix logger name
2021-02-22 13:41:21 +01:00
Tobias Koppers
2bfbf81b59
Merge pull request #12745 from webpack/perf/module-concatenation
...
improve performance of finding modules for concatenation
2021-02-22 13:39:29 +01:00
Tobias Koppers
1c0b88c72f
fix bug where ExportInfo uses inactive connections to find the target of an export
...
This happens when multiple exports * export the same name but the first one is discovered later in the process
In this case the ExportInfo contains both connections, but the second one is inactive.
2021-02-22 12:47:34 +01:00
Tobias Koppers
a084baac2f
improve performance of finding modules for concatenation
2021-02-22 10:52:39 +01:00
Patrik Åkerstrand
a62c350804
simplify branching logic
2021-02-19 19:32:23 +01:00
Patrik Åkerstrand
398fdef5c8
Fix module concatenation renaming bug
...
Fixes a case where variable renaming due to module concatenation caused
the generated code to look up a different property than the source code, when
combined with a default value for the property
Closes #12712
2021-02-19 12:08:21 +01:00
Tobias Koppers
902aecd26c
fix #12669
2021-02-14 19:43:39 +01:00
Tobias Koppers
9f3950e571
add support for libraries combined with iife: false
...
fix missing runtime requirement for system.js context
fix inlining of modules when conflicting symbols are defined on top-level
2021-02-11 11:19:24 +01:00
Tobias Koppers
a936d7b3a0
avoid unnecessary conditions
2021-01-27 13:37:34 +01:00
Tobias Koppers
3cf2f45290
remove unused method
2021-01-25 20:30:46 +01:00
Tobias Koppers
8d2c2f44c5
Merge pull request #12453 from webpack/bugfix/reuse-vendor-entry
...
reuseExistingChunk is able to reuse an entry chunk when it's the only selected chunk
2021-01-19 19:23:38 +01:00
Tobias Koppers
2b3489d136
reuseExistingChunk is able to reuse an entry chunk when it's the only selected chunk
2021-01-19 17:08:58 +01:00
Tobias Koppers
4ec418c8ee
allow inner graph shaking for new URL()
...
fixes #11818
2021-01-19 13:31:55 +01:00
Tobias Koppers
38c7cf2d85
fix caching crash in ConcatenatedModule
...
Ensure that no warnings/errors occur during testing
add serialization for some missing warnings
2021-01-08 15:44:26 +01:00
Tobias Koppers
35c7801b5e
fix bug where cacheGroup index was inverted
2021-01-07 21:47:08 +01:00
Tobias Koppers
3554793b4b
fix bug where module size is added multiple times to the split chunk info
...
fixes #12307
2021-01-07 16:51:08 +01:00
Tobias Koppers
10aa3daede
add experiments.layers
...
add layers to define different module layers
support module layers in stats
add layer support for NormalModules
fixes #11466
2021-01-05 20:50:59 +01:00
highonweb
bc1911bf78
Changed name of memorize function to memoize
2020-12-27 03:02:57 +05:30
Tobias Koppers
1e2634fdd8
manual side effects flagging should override automatic analysis
2020-12-15 14:40:54 +01:00
Tobias Koppers
a0d2b99a34
fixes #12114
2020-12-04 17:03:12 +01:00
Tobias Koppers
dade079110
only move export info targets when also moving dependencies
...
fix #12071
2020-11-30 10:18:38 +01:00
Tobias Koppers
c7ea63875c
improve side effects analysis to report imported and reexports symbols as side-effect-free
...
add bailout messages for side effects
2020-11-28 18:10:27 +01:00
Tobias Koppers
ed742e071b
add test case like html-plugin
2020-11-26 14:00:21 +01:00
Tobias Koppers
ccfe01aab4
allow to process assets that are added during processAssets
...
fix and add processAsset stages
allow to hook into RealContentHashPlugin for custom hashing
2020-11-26 14:00:21 +01:00
Tobias Koppers
cbcd459d19
fix conflicting real imports and type imports
2020-11-26 10:02:59 +01:00
Tobias Koppers
a17ad8eb79
Merge pull request #12002 from webpack/bugfix/ns-consistency
...
make visible exports from non-harmony modules more consistent
2020-11-17 14:15:43 +01:00
Tobias Koppers
590aacc2ae
make visible exports from non-harmony modules more consistent
...
fixes #11995
2020-11-16 17:19:36 +01:00
Tobias Koppers
f32762ed69
fix #11990
2020-11-16 11:53:19 +01:00
Tobias Koppers
3601b4bfe3
handle ASI issue between concatenated modules
...
fixes #11897
2020-11-04 12:02:36 +01:00
Tobias Koppers
77aed6004a
fix a few edge cases with interop
...
add more test cases
2020-11-03 10:40:39 +01:00
Tobias Koppers
c7a9b8ed06
handle renaming in super class expression in nested scopes correctly
...
fixes #11840
2020-11-02 14:16:04 +01:00
Tobias Koppers
18495151b8
handle the case when execution order in a concatenated module is runtime-dependent
...
fix #11863
2020-10-29 17:53:56 +01:00
Tobias Koppers
98743909e6
fix incorrect concatenation when module runtime are merged
...
fixes #11856
2020-10-28 20:22:27 +01:00
Tobias Koppers
167fba77cf
handle runtime-dependent code in concatenated modules
2020-10-27 11:43:58 +01:00
Tobias Koppers
e1b5a78a24
add optimization.sideEffects: "flag" and use this by default
...
analysing for side effects cause unnecessary changes in parent modules and we want to avoid that in development
2020-10-27 06:50:07 +01:00
Tobias Koppers
0a8529fcb1
fix undetected module references
2020-10-20 13:50:32 +02:00
Karlis Gangis
95eabe47ec
fix: handle star import name collisions in module concatenation
2020-10-20 13:50:56 +03:00
Tobias Koppers
b3c73a543b
fix runtime-specific handling in concatenated modules
2020-10-16 11:47:30 +02:00
Tobias Koppers
2888c8a406
Revert "fix unused modules in chunk when optimizing runtime-specific "
2020-10-15 20:17:26 +02:00
Tobias Koppers
11935a9141
Merge pull request #11703 from webpack/bugfix/11678
...
fix infinite loop in inner graph optimization
2020-10-15 14:33:48 +02:00
Tobias Koppers
b6bc2730b9
fix infinite loop in inner graph optimization
...
fixes #11678
2020-10-15 13:24:40 +02:00
Tobias Koppers
5d9d9b90fb
fix runtime-specific handling in concatenated modules
2020-10-15 10:18:41 +02:00
Tobias Koppers
c00f65bc40
follow reexport in concatenated modules even if they are skipped due to side effects
...
fixes #11662
2020-10-13 10:01:54 +02:00
Tobias Koppers
bbe12305d6
Merge pull request #11628 from webpack/bugfix/real-content-hash
...
emit error instead of crashing when unexpected problem occurs
2020-10-10 22:06:40 +02:00
Tobias Koppers
47097196bd
skip connections copied to concatenated module
...
fixes #11617
2020-10-10 01:14:00 +02:00
Tobias Koppers
a8fb45d242
fixes crash in SideEffectsFlagPlugin
...
fixes #11615
2020-10-09 23:15:35 +02:00
Tobias Koppers
84b196d32d
emit error instead of crashing when unexpected problem occurs
2020-10-09 09:14:34 +02:00
Tobias Koppers
e7a18705c7
fix crash when using shared with runtimeChunk
2020-10-08 00:28:30 +02:00
Tobias Koppers
18c20d6327
Merge pull request #11582 from webpack/update-schema-utils
...
chore(deps): update `schema-utils`
2020-10-07 10:30:11 +02:00
Tobias Koppers
8e562aa260
fix some nitpicks with active state
2020-10-07 09:36:41 +02:00
Tobias Koppers
7948cb29df
don't touch not provided exports as they could be on the prototype
...
fix #11580
2020-10-06 15:38:17 +02:00
Tobias Koppers
fcca1d649d
analyse source code for side effects
...
mark the module as side effects free in such cases
allow 3rd state TRANSITIVE_ONLY to be side-effect-free but dependencies should still be included (for mini-css-extract-plugin)
2020-10-06 14:10:29 +02:00
Tobias Koppers
146670b3bd
fix splitChunks error message bug
2020-10-06 11:11:10 +02:00
evilebottnawi
8c19efb7fd
chore(deps): update `schema-utils`
2020-10-05 21:58:54 +03:00
Tobias Koppers
51b6e9c4d7
fix delete in concatenated module
2020-09-29 22:12:42 +02:00
Tobias Koppers
68f0dbe748
allow plugins to modify the default size types for splitChunks
2020-09-29 14:34:59 +02:00
Tobias Koppers
5807e6c4db
when splitChunks entry violates minSize or minRemainingSize retry without offending modules
...
fixes #11513
2020-09-25 16:16:05 +02:00
Tobias Koppers
ea7af1df11
allow to move modules to parent chunks
2020-09-25 10:51:13 +02:00
Tobias Koppers
e0b10e9935
fix caching bug in RealContentHashPlugin
2020-09-16 11:12:41 +02:00
Tobias Koppers
eddd3206dc
add raw export for named reexport from non-harmony
2020-09-15 12:36:29 +02:00
Tobias Koppers
277d4b1b67
handle export mangling in concatenated modules
2020-09-15 12:36:23 +02:00
Tobias Koppers
9af66ff9af
revert to registering the namespace export because we need to know this early
2020-09-15 12:36:16 +02:00
Tobias Koppers
39e1a7e4c7
move magic names to constants in ConcatenationScope
...
improve types
2020-09-15 12:36:06 +02:00
Tobias Koppers
9af1d7526b
refactor module concatenation to address discovered bugs/edge cases
2020-09-15 12:36:02 +02:00
Tobias Koppers
23e91dbbac
move module concatenation bailout checks to Module and for NormalModule to Generator
2020-09-15 12:35:59 +02:00
Tobias Koppers
b58393fce0
fix optimization bailout for HMR dependencies
2020-09-15 12:35:58 +02:00
Tobias Koppers
9941a8a497
create root reexports based on export mappings instead of dependencies
2020-09-15 12:35:55 +02:00
Tobias Koppers
5560415856
create root exports based on export mappings instead of dependencies
2020-09-15 12:35:46 +02:00
Tobias Koppers
91cc17b438
register exports in DependencyTemplates
2020-09-15 12:35:38 +02:00
Tobias Koppers
21e202eb24
move concatenation logic to HarmonyImportSpecifierDependency
2020-09-15 12:35:30 +02:00
Tobias Koppers
fc551fa6f3
move concatenation logic to HarmonyExportExpressionDependency
2020-09-15 12:35:21 +02:00
Tobias Koppers
47344e7e77
move concatenation logic to HarmonyExportSpecifierDependency and HarmonyExportImportedSpecifierDependency
2020-09-15 12:35:13 +02:00
Tobias Koppers
04dde38b4c
move concatenation logic to HarmonyImportSideEffectDependency
2020-09-15 12:35:03 +02:00
Tobias Koppers
fdd4a7713f
add ConcatenationScope
2020-09-15 12:34:50 +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
Ivan Kopeykin
a3fc25cadb
refactor asiSafe flag in dependencies
2020-08-29 17:00:03 +03:00
Ivan Kopeykin
35c56e67ae
refactor how asi handled
...
- add asiSafeExpression helper for JavascriptParser
- use asiSafe flag in DefinePlugin
- try to use (...) instead of Object()
2020-08-28 19:46:56 +03:00
Tobias Koppers
c0249af6d1
Merge pull request #11370 from webpack/feature/javascript-parser-improvement
...
use bitmask instead of array+set in getMemberExpressionInfo
2020-08-28 10:08:22 +02:00
Tobias Koppers
49d9ec5625
cleanup public api and expose JavascriptParser
2020-08-28 01:46:14 +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
49a28a73cf
accept Source-like objects in assets and cache sources for RealContentHashPlugin
2020-08-20 09:54:59 +02:00
Tobias Koppers
64ceeabeae
fixes #11337
2020-08-19 14:45:55 +02:00
Tobias Koppers
b13fe97801
fix edgecase without any hash used
2020-08-19 11:37:17 +02:00
Tobias Koppers
e3fcabd6f6
add caching to RealContentHashPlugin
2020-08-19 11:25:53 +02:00