Merge pull request #24159 from andybalaam/andybalaam/allow-upgrading-worker-loader-to-v3

Upgrade worker loader to v3 (with config fix to prevent bundling)
pull/24160/head
Andy Balaam 2023-01-04 14:41:56 +00:00 committed by GitHub
commit 6ff0524260
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 7 deletions

View File

@ -166,7 +166,7 @@
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2",
"worker-loader": "^2.0.0",
"worker-loader": "^3.0.0",
"worklet-loader": "^2.0.0",
"yaml": "^2.0.1"
},

View File

@ -236,6 +236,11 @@ module.exports = (env, argv) => {
{
test: /\.worker\.ts$/,
loader: "worker-loader",
options: {
// Prevent bundling workers since CSP forbids loading them
// from another origin.
filename: "[hash].worker.js",
},
},
{
test: /\.(ts|js)x?$/,

View File

@ -12695,13 +12695,13 @@ worker-farm@^1.7.0:
dependencies:
errno "~0.1.7"
worker-loader@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-2.0.0.tgz#45fda3ef76aca815771a89107399ee4119b430ac"
integrity sha512-tnvNp4K3KQOpfRnD20m8xltE3eWh89Ye+5oj7wXEEHKac1P4oZ6p9oTj8/8ExqoSBnk9nu5Pr4nKfQ1hn2APJw==
worker-loader@^3.0.0:
version "3.0.8"
resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-3.0.8.tgz#5fc5cda4a3d3163d9c274a4e3a811ce8b60dbb37"
integrity sha512-XQyQkIFeRVC7f7uRhFdNMe/iJOdO6zxAaR3EWbDp45v3mDhrTi+++oswKNxShUNjPC/1xUp5DB29YKLhFo129g==
dependencies:
loader-utils "^1.0.0"
schema-utils "^0.4.0"
loader-utils "^2.0.0"
schema-utils "^3.0.0"
worklet-loader@^2.0.0:
version "2.0.0"