alexander.akait
ab3e93b19e
style: fix
2024-06-11 16:09:50 +03:00
alexander.akait
be1d35eb02
fix(types): more
2024-03-18 18:50:56 +03:00
alexander.akait
55ebdbdb75
fix: improve auto publicPath detection
2024-02-15 16:09:59 +03:00
Nitin Kumar
412ae5425e
chore: udpate prettier to v3
2024-01-14 07:11:34 +05:30
alexander.akait
4809421990
refactor(types): more
2023-06-21 19:00:24 +03:00
ahabhgk
148c136e07
fix: test
2023-06-16 23:04:57 +08:00
ahabhgk
c90f2b35f6
fix: forgot .d
2023-06-16 22:52:27 +08:00
ahabhgk
6e62cf40cf
fix: tla for await won't run
2023-06-16 20:39:13 +08:00
alexander.akait
5efc30a0b0
refactor: rebase
2023-06-14 19:47:52 +03:00
alexander.akait
9894226149
refactor(types): more
2023-06-14 19:46:53 +03:00
alexander.akait
869e59d198
refactor: code
2023-06-13 00:32:42 +03:00
alexander.akait
0391116e8c
refactor: use runtime logic but only when needed
2023-06-13 00:17:53 +03:00
alexander.akait
236a2ae56e
fix: reduce size more
2023-06-12 21:55:53 +03:00
alexander.akait
4649dc0025
fix: reduce runtime size
2023-06-12 21:55:53 +03:00
alexander.akait
fcbbacf730
refactor: logic
2023-06-12 21:55:52 +03:00
Andrew Boktor
f68ab55320
Adding option to set fetchPriority on script tags
2023-06-12 21:55:52 +03:00
Burhanuddin Udaipurwala
839e2bf6ad
refactor: use global runtime constants for webpack exports
2023-05-26 21:04:26 +05:30
alexander.akait
620c8d5fa4
refactor: more types
2023-05-24 22:37:58 +03:00
Burhanuddin Udaipurwala
8d8a0e0e56
refactor: use global constant instead of string literal
2023-05-19 21:25:47 +05:30
Sean Larkin
ddb9627661
Merge pull request #16990 from Zlatkovsky/zlatkovsky/trusted-types-options
...
Allow specifying "onPolicyCreationFailure" mode for trusted types
2023-05-03 09:39:48 -07:00
Michael Zlatkovsky
2203e24900
Add option to continue on trusted-types policy-creation failure
...
Webpack already allows for specifying a trusted-types policy name. However, its current implementation is such that if a call to trustedTypes.createPolicy fails, the code will immediately stop executing. This isn't necessarily desirable, as an application could be in the early phases of rolling out trusted types, and thus have the CSP rule for trusted-types LibraryA LibraryB etc, BUT have require-trusted-types-for 'script' be in "report only" mode (Content-Security-Policy-Report-Only). In such a configuration, and when the webpacked code is dynamically-loaded into an application, adding the policy name to the webpack config will break old versions.
This PR keeps the original behavior, but introduces a new option for onPolicyCreationFailure: "continue" | "stop" (with "stop" remaining the default). If a developer chooses the "continue" option, the policy-creation will be wrapped in a try/catch. There is no security risk to this, since for host applications that DO have strict enforcement of trusted-types, the code will simply fail when the dangerous sink is used (e.g., when doing parseFromString). And likewise, wrapping in try/catch and doing nothing on catch is OK, because the code already deals with the possibility of the trustedTypes API not being available on the browser.
2023-05-02 10:12:56 -07:00
alexander.akait
ede77bcb20
refactor(type): small improve
2023-05-01 00:58:34 +03:00
alexander.akait
308ee42f74
fix: detection automatic public path
2023-04-23 17:36:59 +03:00
Nitin Kumar
44256c25cf
fix: add missing semicolon in `AutoPublicPathRuntimeModule`
2023-03-14 18:44:23 +05:30
yanyuhao.joy
04c2737a29
chore: Remove redundant semicolons after onScriptComplete function close: #16346add route match
2022-11-18 16:32:49 +08:00
Tobias Koppers
761a54285e
fix semicolon position
2022-11-09 13:00:33 +01:00
Tobias Koppers
402d152ccf
Merge pull request #15642 from webpack/set-use-credentials-without-origin-check
...
set crossOrigin=use-credentials without origin check
2022-07-25 09:25:12 +02:00
Tobias Koppers
780abb3f95
remove unnecessary moduleId property on Promise
2022-06-30 12:35:17 +02:00
Tobias Koppers
509a060025
fix quadratic evaluation performance of async modules
...
improve runtime code for async modules
2022-06-02 12:37:36 +02:00
Ivan Kopeykin
ce56e3b61c
add NonceRuntimeModule
2022-05-09 21:45:42 +03:00
Ivan Kopeykin
8729f2e787
set crossOrigin=use-credentials without origin check
2022-04-08 15:53:28 +03:00
Ivan Kopeykin
26f3a1d21c
add base uri runtime module if chunkLoading=false
2022-03-07 12:28:03 +03:00
Tobias Koppers
804f49c32c
fix handling of errors thrown in async modules
2022-01-27 16:28:28 +01: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
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 Smolka
3f9643cb05
Merge branch 'main' of https://github.com/webpack/webpack into tosmolka/14075
2021-09-10 13:52:36 +02:00
Tobias Koppers
9dfcc27f6b
remove unnecessary Object.assign
2021-09-09 00:28:44 +02:00
Tobias Smolka
1339272be6
Support Trusted Types in EvalSourceMapDevToolPlugin
2021-09-08 12:34:00 +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