Commit Graph

108 Commits

Author SHA1 Message Date
Jack Works cf1dc2f131
feat: implement tc39 Defer Module Evaluation (experiment)
* feat: implement tc39 defer import proposal

Co-authored-by: Nicolo Ribaudo <hello@nicr.dev>

* fix: keys of DeferredNamespaceObject

* refactor: MakeDeferredNamespaceObjectRuntimeModule

---------

Co-authored-by: Nicolo Ribaudo <hello@nicr.dev>
Co-authored-by: Hai <haijie0619@gmail.com>
2025-07-02 15:02:03 +03:00
Alexander Akait 9cf04be110
fix: regression with location (#19528) 2025-05-14 19:04:17 +03:00
hai-x cca6919176
fix: types 2025-05-13 16:03:58 +03:00
Alexander Akait e911f5296d
fix: no `object` types and less `any` types
Github Actions / lint (push) Has been cancelled Details
Github Actions / basic (push) Has been cancelled Details
Github Actions / validate-legacy-node (push) Has been cancelled Details
Github Actions / unit (push) Has been cancelled Details
Github Actions / integration (10.x, macos-latest, a) (push) Has been cancelled Details
Github Actions / integration (10.x, macos-latest, b) (push) Has been cancelled Details
Github Actions / integration (10.x, ubuntu-latest, a) (push) Has been cancelled Details
Github Actions / integration (10.x, ubuntu-latest, b) (push) Has been cancelled Details
Github Actions / integration (10.x, windows-latest, a) (push) Has been cancelled Details
Github Actions / integration (10.x, windows-latest, b) (push) Has been cancelled Details
Github Actions / integration (12.x, ubuntu-latest, a) (push) Has been cancelled Details
Github Actions / integration (14.x, ubuntu-latest, a) (push) Has been cancelled Details
Github Actions / integration (16.x, ubuntu-latest, a) (push) Has been cancelled Details
Github Actions / integration (18.x, ubuntu-latest, a) (push) Has been cancelled Details
Github Actions / integration (18.x, ubuntu-latest, b) (push) Has been cancelled Details
Github Actions / integration (20.x, macos-latest, a) (push) Has been cancelled Details
Github Actions / integration (20.x, macos-latest, b) (push) Has been cancelled Details
Github Actions / integration (20.x, ubuntu-latest, a) (push) Has been cancelled Details
Github Actions / integration (20.x, ubuntu-latest, b) (push) Has been cancelled Details
Github Actions / integration (20.x, windows-latest, a) (push) Has been cancelled Details
Github Actions / integration (20.x, windows-latest, b) (push) Has been cancelled Details
Github Actions / integration (22.x, macos-latest, a) (push) Has been cancelled Details
Github Actions / integration (22.x, macos-latest, b) (push) Has been cancelled Details
Github Actions / integration (22.x, ubuntu-latest, a) (push) Has been cancelled Details
Github Actions / integration (22.x, ubuntu-latest, b) (push) Has been cancelled Details
Github Actions / integration (22.x, windows-latest, a) (push) Has been cancelled Details
Github Actions / integration (22.x, windows-latest, b) (push) Has been cancelled Details
Github Actions / integration (23.x, ubuntu-latest, a) (push) Has been cancelled Details
Github Actions / integration (23.x, ubuntu-latest, b) (push) Has been cancelled Details
Github Actions / integration (lts/*, ubuntu-latest, a, 1) (push) Has been cancelled Details
Github Actions / integration (lts/*, ubuntu-latest, b, 1) (push) Has been cancelled Details
2025-04-02 19:02:22 +03:00
ShobhitPatra 394c4c32e9 optimize loc for monomorphic inline caching 2025-03-13 20:21:25 +05:30
alexander-akait a1df00d339 refactor: improve eslint configuration and better types 2025-03-12 04:56:14 +03:00
alexander.akait a2b0f9bac0 fix: ts types 2024-08-14 21:38:08 +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 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
alexander.akait cf62464926 style: fix 2024-02-28 18:23:23 +03:00
alexander.akait 1b1c8a4a6a fix: deserializer for ignored modules 2024-02-28 18:08:34 +03:00
alexander.akait 6ab9bdaa73 fix: types 2024-02-22 17:20:17 +03:00
alexander.akait e381884115 refactor(types): more 2023-06-21 19:00:24 +03:00
alexander.akait 4f6dc32d38 chore: improve types 2023-04-21 19:22:33 +03:00
Ivan Kopeykin cf5fc90082 support context in Dependency 2022-03-25 17:01:48 +03:00
Tobias Koppers e67ab7fad2 resolve todos, nitpicks 2021-12-03 08:47:17 +01:00
Tobias Koppers 1e5abcc51b improve extractBlockModules 2021-10-06 15:39:21 +02:00
Tobias Koppers 16fc4bb7af allow dependencies to select level of propagation 2021-09-27 20:38:08 +02:00
Tobias Koppers 0aff7d2c63 avoid creating objects for location info when not accessed 2021-04-27 09:36:52 +02:00
Tobias Koppers 78ee6fb386 store parents in Dependency 2021-04-23 14:51:25 +02:00
Tobias Koppers 83c8180c7d prioritize static reexport over runtime reexport for target determination
this allows to optimize cases where empty modules are reexported e. g. caused by typescript type-only exports
2021-04-06 21:36:43 +02:00
Tobias Koppers 667bbf02bb export base dependencies correctly 2021-03-31 16:40:24 +02:00
Tobias Koppers 72455273db allow to define "ignored modules" per dependency
new URL() will use `"data:"` when ignore
2021-03-11 18:37:20 +01:00
Tobias Koppers 87a70e03b8 unset targets when a harmony star reexport is hidden by another one 2021-02-22 21:56:00 +01:00
Tobias Koppers a936d7b3a0 avoid unnecessary conditions 2021-01-27 13:37:34 +01:00
Tobias Koppers 97b83161d9 move responsibility of exports info and connected modules hashing from Dependencies to Module
fixes a bug where modules are incorrectly cached when exports info of connected modules change
2021-01-24 21:36:36 +01:00
Tobias Koppers 19f51535ca merge multiple import statements with different conditions correctly
improve hashing when conditional runtime evaluation is involved
add test cases
2020-10-27 06:48:54 +01:00
Tobias Koppers 65eca2e529 expose webpack from Compiler
fix some jsdoc descriptions
2020-10-12 20:16:58 +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 9af1d7526b refactor module concatenation to address discovered bugs/edge cases 2020-09-15 12:36:02 +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 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
Ivan Kopeykin 198e51a485 Merge branch 'master' into exports-field
# Conflicts:
#	lib/dependencies/ImportDependency.js
#	lib/sharing/ConsumeSharedPlugin.js
#	lib/sharing/ProvideSharedPlugin.js
#	types.d.ts
2020-06-16 21:16:41 +03:00
Tobias Koppers a4ac8f0328 Cleanup 2020-06-10 14:01:24 +02:00
Pushkar DK 31e3369a73 Add 'webpackExports' & make only referenced exports available in import() 2020-06-06 00:11:21 +05:30
Ivan Kopeykin b7098ae52b define dependency category as string instead of enum 2020-05-27 22:57:45 +03:00
Ivan Kopeykin dea031475e add dependency category property 2020-05-26 23:56:24 +03:00
Tobias Koppers fdf43eab16 Connect more info about exports when using export * 2020-05-19 03:16:21 +02:00
Tobias Koppers a643278726 refactor exports info logic always represent exports object instead of namespace object
improve test case
2020-04-22 21:01:29 +02:00
evilebottnawi a6a9ce3a74 chore: setup cspell 2020-03-13 14:09:14 +03:00
Tobias Koppers b4993f1ccc
Merge pull request #10503 from joeldenning/system-esmodule
Fix externals interop within SystemLibraryPlugin.
2020-03-10 15:38:38 +01:00
Tobias Koppers c94aea82cc enable export mangling for system.js externals
add __esModule flag only when needed
2020-03-05 14:07:55 +01:00
evilebottnawi 93dd2b0cfb chore(deps): update eslint plugins 2020-03-04 12:37:14 +03:00
Tobias Koppers 14ee25cd0a add support for tree-shaking JSON modules 2019-11-05 10:37:59 +01:00
Tobias Koppers 09d182132a rename reference exports constants 2019-10-30 07:57:55 +01:00