Commit Graph

140 Commits

Author SHA1 Message Date
alexander.akait be1d35eb02 fix(types): more 2024-03-18 18:50:56 +03:00
Nitin Kumar 412ae5425e chore: udpate prettier to v3 2024-01-14 07:11:34 +05:30
Diogo Peres 4e8f3f6075 fix importScripts typo 2023-07-03 10:57:21 +01:00
alexander.akait 4809421990 refactor(types): more 2023-06-21 19:00:24 +03:00
alexander.akait 568f28bb87 refactor(types): more 2023-06-14 19:45:51 +03:00
alexander.akait 3591783d9e refactor(types): wasm and runtime 2023-05-26 01:18:44 +03:00
Sean Larkin 4a8035f2b5
Merge pull request #17228 from burhanuday/refactor/burhan-use-globals
refactor: use global constant for __webpack_require__ instead of string literal
2023-05-24 07:16:33 -07:00
alexander.akait f003f1c138 refactor: types more 2023-05-22 05:12:44 +03:00
Burhanuddin Udaipurwala 8d8a0e0e56 refactor: use global constant instead of string literal 2023-05-19 21:25:47 +05:30
Tobias Koppers 49dab4cc5e add semicolon 2022-02-22 09:54:35 +01:00
Ivan Kopeykin 2665fb118c add baseUri entry option 2022-02-21 16:23:47 +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 0670cf5ba4 remove unneeded transitive runtime requirement 2022-01-20 16:35:25 +01:00
Tobias Koppers b9c6691ff5 bugfixes, external assets 2021-12-03 16:23:09 +01:00
Ivan Kopeykin edeaa6eb82 use "safe" global object 2021-11-23 20:40:03 +03: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 88da3f8ed2 normalize output.trustedTypes to an object 2021-05-10 10:34:21 +02:00
Tobias Koppers a86974b7aa rename to CreateScriptUrlRuntimeModule to have same name as RuntimeGlobal 2021-05-10 10:09:18 +02:00
Tobias Koppers 869f9c8a8c use createScriptUrl only when needed 2021-05-10 09:58:27 +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
Krzysztof Kotowicz 8c3ebccc69 Added Trusted Types support for importScripts() in workers. 2021-05-04 16:17:49 +02:00
Tobias Koppers 2df8267220 handle falsy entry options correctly 2021-04-14 20:21:17 +02:00
Tobias Koppers d808d04d26 attach the chunk graph to RuntimeModules 2021-04-14 12:26:35 +02:00
Tobias Koppers 7dc945f147 allow to place runtime outside of the output path 2021-03-16 13:07:58 +01:00
Anshuman Verma eb63cb78b6 fix: prefix public path in importScripts 2021-03-15 16:08:59 +01:00
Tobias Koppers 69218d4ea0 fix problem with startup of non-js initial chunks
fixes #12880
2021-03-14 19:54:50 +01:00
Tobias Koppers cf208782e6 fix web worker chunk loadign for non-js chunks 2021-03-11 18:32:44 +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 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
Tobias Koppers 7381cc0536 move baseUri into chunk loading runtime modules 2020-08-29 01:59:39 +02:00
Tobias Koppers 6928a65911 conflict-free handling of global in import-script
use destructuring when available
2020-08-28 11:27:33 +02:00
Tobias Koppers 07d863e14c implement enabledChunkLoadingTypes approach
allow chunkLoading per entry
allow custom library/chunkLoading types
2020-08-28 10:59:37 +02:00
Tobias Koppers 3ec865d3e2 move StartupChunkDependenciesPlugin into chunk loading plugins 2020-08-28 10:58:05 +02:00
Tobias Koppers d69fadf8e8 add output.chunkLoading option to control chunk loading plugins 2020-08-28 10:58:04 +02:00
Tobias Koppers 23d230bdf9 move chunk loading into separate plugins 2020-08-28 10:58:03 +02:00
Tobias Koppers e5ba0356f5 use array push chunk format for web workers too 2020-08-28 10:58:02 +02:00
Tobias Koppers 805d26b0ae unify config options for jsonpFunction and chunkLoadFunction to chunkLoadingGlobal
rename hotUpdateFunction to hotUpdateGlobal
2020-08-28 10:58:00 +02:00
Tobias Koppers 305dab3ae1 improve and fix backtracing to root folder from nested directories 2020-08-04 09:36:49 +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 b9c50fdb09 fix jsdoc documentations 2020-04-28 19:42:58 +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
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
evilebottnawi 8198ffb3e6 refactor: code 2019-10-22 00:14:05 +02:00
Tobias Koppers ecbcdf527f apply chunk template modifications only to non-runtime chunks 2019-10-09 15:55:21 +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 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