Commit Graph

62 Commits

Author SHA1 Message Date
Alexander Akait f6c3c24da3
feat: added support for import file from "./file.ext" with { type: "bytes" } to get the content as `Uint8Array` (#19928) 2025-09-24 21:01:10 +03:00
Natsu 1f19f950e6
refactor: standardize ESM naming management (#19730) 2025-07-25 18:23:07 +03:00
Alexander Akait 87f648ebf0
chore: eslint more rules (#19648) 2025-07-03 12:06:45 +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 5725254415 style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait 0391116e8c refactor: use runtime logic but only when needed 2023-06-13 00:17:53 +03:00
alexander.akait fcbbacf730 refactor: logic 2023-06-12 21:55:52 +03:00
Tobias Koppers 1ed8aaf2e2
Merge pull request #14173 from tosmolka/tosmolka/14075
Support Trusted Types in EvalSourceMapDevToolPlugin
2022-01-20 17:36:55 +01:00
Tobias Koppers 713aa3715f fix missing css runtime when only initial css is used 2022-01-13 10:40:53 +01:00
Tobias Koppers 77b5589c1a css generation and hmr 2021-12-03 08:46:22 +01:00
Tobias Smolka 1339272be6 Support Trusted Types in EvalSourceMapDevToolPlugin 2021-09-08 12:34:00 +02:00
Tobias Koppers 08ea1464d5 keep state of chunk loading during hmr updates
ignore duplicate chunk loads
2021-08-16 13:50:43 +02:00
Tobias Koppers 4b1592d07a rename createScriptURL to createScriptUrl 2021-05-10 09:09:34 +02:00
Bjarki b6e112dabe Only expose createScriptURL function from Trusted Types policy
Since createScriptURL is the only function that is used on webpack's
Trusted Types policy, replace the getTrustedTypesPolicy global with a
simpler createScriptURL global.

In terms of compiled code, this replaces the non-minifiable
tt().createScriptURL(url) with tu(url), which is more compact in terms
of code size.
2021-05-04 16:26:22 +02:00
Bjarki c71184958d Move Trusted Types policy into TrustedTypesRuntimeModule
Also make the policy available at runtime through
RuntimeGlobals.getTrustedTypesPolicy(), and update runtime dependencies
accordingly.
2021-05-04 16:12:41 +02:00
Tobias Koppers c7f93af138 refactor startup logic to better integrate with libraries
get rid of startupNoDefault and many custom logic regarding this in jsonp chunk loading
add onChunksLoaded runtime method to cover that for all chunk loading types
add `__webpack_runtime_id__` to access the current runtime
allow to use onChunksLoaded for other module types too
2021-03-08 20:25:09 +01:00
Tobias Koppers 5d57777a5e add `parser.url: "relative"` option
this will generate URLs without base uri for `new URL`
publicPath is still added
2021-02-16 19:04:16 +01:00
Tobias Koppers 495cabb94d improve TLA consistency 2021-01-29 13:51:32 +01:00
Tobias Koppers d64227af29 re-add chunkId to script loading when available 2021-01-06 10:08:40 +01:00
Tobias Koppers 48571c663f add selective runtime requirements from startup logic which doesn't prevent inlining modules
avoid using startup function for grab data from preexecuted chunks
2020-12-11 14:36:48 +01:00
Tobias Koppers 7661ad868a generate code that executes depending on runtime
fixes #11770
2020-10-27 06:30:49 +01:00
Tobias Koppers a8542d3317 fix circular references between containers and modules in containers 2020-09-17 10:44:52 +02:00
Tobias Koppers 312e2ab587 Merge branch 'master' into feature/asset-url 2020-08-28 20:54:50 +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
Ivan Kopeykin ddc83b0d70 feat: url assets 2020-08-05 00:55:38 +03:00
Tobias Koppers 8948263db8 avoid using getChunkModuleMaps as it doesn't support different modules per runtime 2020-07-28 17:16:32 +02:00
Tobias Koppers 9f28e37969 allow runtimeChunk with node targets
also fixes a incorrect relative path
2020-06-29 11:46:16 +02:00
Tobias Koppers 531f7b47f6 move script loading into separate runtime module
attach to existing script tags
2020-06-04 03:01:22 +02:00
Tobias Koppers e78a76b2e0 remove all overrides and overridables related code 2020-05-26 17:26:28 +02:00
Tobias Koppers a468cbbd2e add provide shared module plugin 2020-05-23 16:08:51 +02:00
Tobias Koppers 5887c20ab0 Merge tag 'v5.0.0-beta.15' into dev-1
5.0.0-beta.15
2020-04-22 07:37:49 +02:00
Tobias Koppers 2d95f1b8d7 refactor HMR javascript part to reduce duplication
add invalidate to HMR API
2020-04-15 11:12:33 +02:00
Tobias Koppers d5c31ab864 Merge branch 'master' into dev-1 2020-04-14 12:48:38 +02:00
Tobias Koppers 7e5fdaafc0
Merge pull request #9119 from joeldenning/system-context
Exposing System.register _context variable to bundled code.
2020-03-30 11:06:59 +02:00
Tobias Koppers 575d6aa4f0 Merge branch 'master' into dev-1 2020-03-20 09:58:13 +01:00
evilebottnawi dafa4cd69a chore: setup cspell 2020-03-12 19:51:26 +03:00
Joel Denning 76d5cd579c Exposing System.register _context variable to bundled code.
Making __system_context__ available to code splits.

Fixing git problem

Making PR compatible with webpack 5

Undoing prettier changes to open-bot

Adding test

Triggering build

Triggering build

Reimplementing with new file

Exposing System.register _context variable to bundled code.

Making __system_context__ available to code splits.

Making PR compatible with webpack 5

Undoing prettier changes to open-bot

Adding test

Triggering build

Triggering build

Self review

Self review

Fixing license

Removing deleted file

Fix
2020-02-29 15:24:52 -07:00
Tobias Koppers 1c630f1435 add OverridablesPlugin 2020-02-24 15:15:23 +01:00
Tobias Koppers 6b9d510612 refactor chunk prefetching/preloading into separate plugin and runtime modules 2019-12-19 12:01:46 +01:00
Tobias Koppers ab8a768cac remove module.id and loaded shortcuts and only include them when used 2019-12-06 11:09:43 +01:00
TrejGun f5561038b9 fix typo 2019-12-03 21:04:18 +03:00
Sergey Melyukov faf784b6ab refactor hop runtime helper 2019-12-03 16:27:39 +03:00
Sergey Melyukov 6b59d113a4 optimize webpack runtime size 2019-12-02 17:59:37 +03:00
Tobias Koppers 3e54494606 remove supportsSymbolsDeconflicting 2019-10-09 11:49:48 +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 f45ba2408e remove items from runtime when unneeded
remove some hooks from MainTemplate, move some hooks to CompatRuntimeModule
add requireScope RuntimeGlobal
2019-10-08 23:46:23 +02:00
Tobias Koppers e507392094 add output.ecmaVersion options to set emitted code style
fix a bug with prefetching initial chunks
InitFragments have get[End]Content methods which get a sourceContext
RuntimeModules have implicit chunk and compilation
changed default to `output.ecmaVersion: 2015`
2019-08-26 21:32:29 +02:00
Tobias Koppers f68bb833d2 Merge export getters in a module into single statement 2019-08-23 14:07:01 +02:00
Tobias Koppers de61023616 add side-by-side wasm support based on async modules
type: "webassembly/async-experimental"
remove i64 importing limitation since it will have BigInt integration eventually
update wasm example
2019-06-04 23:28:56 +02:00
Tobias Koppers f446bf8a9b add ability to load dependent chunks for non-web targets
This allows to use `splitChunks` for initial chunks in i. e. node and webworker targets
2018-12-29 12:48:59 +01:00