Commit Graph

156 Commits

Author SHA1 Message Date
Alexander Akait 52dc1936a9
chore: refactor plugin name (#19456) 2025-04-23 15:03:37 +03:00
Alexander Akait 4d6d3800b4
fix: types 2025-04-16 17:04:11 +03:00
alexander-akait a1df00d339 refactor: improve eslint configuration and better types 2025-03-12 04:56:14 +03:00
Alexander Akait af20c7be24
fix: strip `blob:` protocol when public path is `auto` (#19199) 2025-02-06 23:25:59 +03:00
Nitin Kumar eba41c692c chore: udpate dependencies 2024-10-14 08:32:08 +05:30
alexander.akait 9192eefa6c test: fix 2024-10-04 17:37:20 +03:00
alexander.akait 2411661bd1 security: fix DOM clobbering in auto public path 2024-08-21 15:47:34 +03:00
alexander.akait 7fd8ffb271 fix: types 2024-08-08 20:03:17 +03:00
alexander.akait 1805436d3b fix: types 2024-08-07 21:59:26 +03:00
alexander.akait 93743d233a refactor: code 2024-08-02 19:32:31 +03:00
alexander.akait c802a98f58 style: improve 2024-08-02 19:32:22 +03:00
alexander.akait 9943f3506a style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait b9d9a5d9ff style: improve style of code 2024-08-02 19:32:14 +03:00
alexander.akait a592b62686 style: improve style of code 2024-08-02 19:32:14 +03:00
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