Aleen
ab34ffb2ae
Revert to use ['catch'] directly
2021-11-02 12:52:00 +08:00
Aleen
4c50786098
use propertyAccess to generate .catch code
2021-11-02 12:51:59 +08:00
Tobias Koppers
9dfcc27f6b
remove unnecessary Object.assign
2021-09-09 00:28:44 +02:00
Tobias Koppers
b16568a253
upgrade filename runtime module to full hash module when referencing a full hash chunk
2021-09-02 10:29:59 +02:00
Tobias Koppers
c469adc265
fix handling of onChunksLoaded with prefetching
2021-07-16 18:11:29 +02:00
yiminghe
68b020ee42
use es5 for async module runtime
2021-06-29 16:17:18 +08:00
Tobias Koppers
b0fa9ccada
pretty files
2021-05-11 09:31:46 +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
1879f243dd
generate shorter code
2021-05-10 09:58:27 +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
Tobias Koppers
bb8ba1cd05
disable trustedTypes by default
...
allow to pass a boolean as trustedTypesPolicy
2021-05-10 09:02:46 +02:00
Krzysztof Kotowicz
3561285ea8
Skip using Trusted Types checks if trustedTypesPolicyName is empty.
2021-05-07 10:30:57 +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
Krzysztof Kotowicz
dbd095b44a
Added the Trusted Types logic.
2021-05-04 16:12:34 +02:00
Tobias Koppers
2df8267220
handle falsy entry options correctly
2021-04-14 20:21:17 +02:00
Tobias Koppers
aca0ee5073
Merge pull request #13137 from webpack/feature/public-path-entry
...
allow to specify `publicPath` for each entrypoint
2021-04-14 18:22:59 +02:00
Tobias Koppers
38de0dbf4e
allow to specify `publicPath` for each entrypoint
2021-04-14 16:38:01 +02:00
Tobias Koppers
d808d04d26
attach the chunk graph to RuntimeModules
2021-04-14 12:26:35 +02:00
Tobias Koppers
065177df66
add experimental support for build time execution
...
allow to execute a part of the module graph at build time
e. g. to generate code or other assets
loaders have access to that via `this.importModule(request, options)`
2021-04-12 12:27:54 +02:00
Tobias Koppers
7dc945f147
allow to place runtime outside of the output path
2021-03-16 13:07:58 +01:00
Tobias Koppers
99ab8bc7a9
Merge pull request #12610 from anshumanv/12577
...
fix: prefix public path in importScripts
2021-03-15 17:02:41 +01:00
Anshuman Verma
eb63cb78b6
fix: prefix public path in importScripts
2021-03-15 16:08:59 +01:00
Tobias Koppers
7f4ce2cf1a
add expressionFunction helper to choose shortest variant when return value is not relevant
2021-03-15 15:40:30 +01:00
evilebottnawi
ea9b9917cd
fix: add `;`
2021-03-15 14:42:55 +03:00
evilebottnawi
c223b65e7a
fix: code
2021-03-15 14:42:55 +03:00
evilebottnawi
57eaf7f23c
refactor: code
2021-03-15 14:42:55 +03:00
evilebottnawi
ab60c54f3d
fix: es5
2021-03-15 14:42:55 +03:00
Tobias Koppers
393913dbd8
rename files, avoid indenting runtime code
2021-03-09 09:42:01 +01: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
cc6f3d9113
fix regression when combining library + runtimeChunk + node target
...
related to https://github.com/vercel/next.js/pull/22187
2021-02-18 15:50:40 +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
b352f20d2d
add "first" to SetHelpers
2021-02-09 21:26:30 +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
d46f945572
fix problem when HMR and different runtimes
...
allow HMR to work in WebWorkers too
2020-11-28 13:53:32 +01:00
Tobias Koppers
cbcd459d19
fix conflicting real imports and type imports
2020-11-26 10:02:59 +01:00
Tobias Koppers
ac15f06f2a
improve handling of exported Promises
2020-11-16 20:24:54 +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
7661ad868a
generate code that executes depending on runtime
...
fixes #11770
2020-10-27 06:30:49 +01:00
Tobias Koppers
f263359fd8
use output.importMetaName for import.meta
2020-09-18 10:55:37 +02:00
Tobias Koppers
2f01aac8ce
web worker support for automatic publicPath
2020-09-18 10:31:05 +02:00
Tobias Koppers
aa74705297
split auto publicPath into separate module
2020-09-18 10:13:31 +02:00
Tobias Koppers
b5719c57e2
improve public path runtime module
2020-09-18 09:48:53 +02:00
Tobias Koppers
c67e03abc7
move undo path to runtime module
...
fix escaping in output code
fix missing contentHashType
2020-09-18 09:10:10 +02:00
Ivan Kopeykin
49009486df
support undo path
2020-09-16 23:20:44 +03:00
Ivan Kopeykin
fad7712bba
support output.importFunctionName
2020-09-15 21:03:05 +03:00