From d684f7f3365aff2297b38c79830c43268fb773a1 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Wed, 4 Jan 2023 11:41:09 +0000 Subject: [PATCH 1/2] Re-update dependency worker-loader to v3 (#24033) This reverts commit 211de2b4c844dcf227ad66f61ff04e628b8ad297. --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 6522497c6c..07ec89ae85 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/yarn.lock b/yarn.lock index 9cbd5628be..4b28da023d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" From 8d4215557afe8fab81c763322a3f6ec58b3977a4 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Wed, 4 Jan 2023 13:36:18 +0000 Subject: [PATCH 2/2] Specify the filename for worker-loader to avoid bundling workers --- webpack.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index dce54b53f3..0840451c59 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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?$/,