Commit Graph

126 Commits

Author SHA1 Message Date
Alexander Akait 99c36fab8e
refactor: remove unused types (#19894) 2025-09-10 14:38:19 +03:00
Alexander Akait 95ce962897
refactor: avoid unnecessary the `defer` property for dependency (#19893) 2025-09-10 01:43:17 +03:00
Alexander Akait 79304704b5
fix: many types 2025-08-28 13:34:30 +03:00
Sergei Slipchenko fbb7a8dd08
fix: await async dependencies when accepting them during HMR (#19739)
Fixes #19731
2025-07-28 16:42:28 +03:00
Alexander Akait 36a976b084
feat: added the `deferImport` option to parser options (#19737) 2025-07-28 15:18:09 +03:00
Alexander Akait 703d9acfe7
style: set `arrowParens` to `true` (#19706)
Github Actions / lint (push) Waiting to run Details
Github Actions / validate-legacy-node (push) Waiting to run Details
Github Actions / benchmark (1/4) (push) Waiting to run Details
Github Actions / benchmark (2/4) (push) Waiting to run Details
Github Actions / benchmark (3/4) (push) Waiting to run Details
Github Actions / benchmark (4/4) (push) Waiting to run Details
Github Actions / basic (push) Waiting to run Details
Github Actions / unit (push) Waiting to run Details
Github Actions / integration (10.x, macos-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (10.x, macos-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (10.x, ubuntu-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (10.x, ubuntu-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (10.x, windows-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (10.x, windows-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (12.x, ubuntu-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (14.x, ubuntu-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (16.x, ubuntu-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (18.x, ubuntu-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (20.x, macos-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (20.x, macos-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (20.x, ubuntu-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (20.x, ubuntu-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (20.x, windows-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (20.x, windows-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (22.x, macos-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (22.x, macos-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (22.x, ubuntu-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (22.x, ubuntu-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (22.x, windows-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (22.x, windows-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (24.x, macos-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (24.x, macos-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (24.x, ubuntu-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (24.x, ubuntu-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (24.x, windows-latest, a) (push) Blocked by required conditions Details
Github Actions / integration (24.x, windows-latest, b) (push) Blocked by required conditions Details
Github Actions / integration (lts/*, ubuntu-latest, a, 1) (push) Blocked by required conditions Details
Github Actions / integration (lts/*, ubuntu-latest, b, 1) (push) Blocked by required conditions Details
2025-07-16 19:13:14 +03:00
Natsu Xiao a1f619a468
fix: handle the case where a chunk is imported both as defer and non-defer (#19665) 2025-07-08 15:48:52 +03:00
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 17b9d03f27
fix: a lot of types 2025-04-07 16:09:05 +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
alexander.akait a2b0f9bac0 fix: ts types 2024-08-14 21:38:08 +03:00
alexander.akait b9d9a5d9ff style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait a260df0fff chore: fix prettier 2024-07-30 17:21:50 +03:00
alexander.akait 93b3008fc0 chore: improve jsdoc eslint rules 2024-07-30 15:26:24 +03:00
alexander.akait 6154a2393f refactor: code 2024-06-10 19:21:03 +03:00
alexander.akait be1d35eb02 fix(types): more 2024-03-18 18:50:56 +03:00
alexander.akait c80a7f2e16 refactor: code use attributes instead assertions 2024-03-15 18:11:02 +03:00
Nitin Kumar 412ae5425e chore: udpate prettier to v3 2024-01-14 07:11:34 +05:30
alexander.akait 055737dc0c refactor(types): more 2023-05-21 23:31:30 +03:00
alexander.akait 4f6dc32d38 chore: improve types 2023-04-21 19:22:33 +03:00
Tobias Koppers f9e6b682ab make exportsPresence strict by default in future 2021-11-05 16:13:49 +01:00
Tobias Koppers d9c592738a refactor and add test cases
add `parser.exportPresence`, `parser.importExportPresence`, `parser.reeexportExportPresence` `"error" | "warn" | "auto" | false`
2021-11-02 18:29:47 +01:00
Tobias Koppers 9e4c259cce fix some cases where undefined modules are used 2021-09-28 19:11:39 +02:00
Sven Sauleau 6c50c81350 Revert "Revert "Merge pull request #12278 from xtuc/sven/import-assertions""
This reverts commit 61946b7c46.
2021-07-24 23:28:30 +01:00
Tobias Koppers 61946b7c46 Revert "Merge pull request #12278 from xtuc/sven/import-assertions"
This reverts commit df02bc6c0a, reversing
changes made to a6f341e243.
2021-07-16 21:54:21 +02:00
Tobias Koppers 7f22e4721f match on asserts
change Map to Record
improve test case
2021-07-16 13:17:20 +02:00
Sven Sauleau b166f46f2c parse import assertions 2021-07-16 13:14:54 +02:00
Tobias Koppers 03f740a96c Show error details automatically when only 2 or less errors are there
Show message that points you to errorsDetails when error details are hidden
Improve some error messages
Highlight important parts of error message with colors
2021-02-05 15:55:31 +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 e1a405e3c2 prettier 2020-11-26 10:52:55 +01:00
Tobias Koppers cbcd459d19 fix conflicting real imports and type imports 2020-11-26 10:02:59 +01:00
Tobias Koppers 8aecb1f61e emit errors for exports in commonjs modules for which we know that they don't exist 2020-11-19 12:15:09 +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 7661ad868a generate code that executes depending on runtime
fixes #11770
2020-10-27 06:30:49 +01:00
Tobias Koppers 8e562aa260 fix some nitpicks with active state 2020-10-07 09:36:41 +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 71cf7f4dc8 add support for reexporting in CommonJS
and necessary refactoring + fixes for that
2020-08-17 21:32:47 +02:00
Tobias Koppers b741dde35e remove obsolete code related to import await 2020-08-14 10:51:07 +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 78920aa689 ignore linking errors when the imported module has errors 2020-07-07 17:54:15 +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
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 a66290a15f add support for async externals
add `promise` external
add `import` external (uses import())

add `output.importFunctionName` option to change the `import()` function name

allow for inline external type when using arrays

fix some typings

fix namespace object behavior when using system external and accessing nested property
fix interop behavior for async dynamic modules
2020-05-19 17:25:43 +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
Tobias Koppers b53a128513 provide better error message when a export name was not found 2020-01-15 22:44:06 +01:00
Tobias Koppers bbace17380 generate await code for import without await too
fixes #10194
2019-12-30 20:34:36 +01:00
Tobias Koppers 782e4535ac Refactor how exportsType work
add flagged exportsType for __esModule flagged
add getExportsType to merge strict with exportsType
move CommonJsStuffPlugin into CommonJsPlugin
split CommonJsPlugin into imports and exports part
enable minimal tree shaking for CommonJs imports and exports
2019-12-06 11:13:08 +01:00
Tobias Koppers ae261ed4c1 move default object redirect logic into separate meta property 2019-12-06 11:12:26 +01:00