Commit Graph

120 Commits

Author SHA1 Message Date
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
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