Squashed commit of the following:

commit 069c1bc833
Author: Johannes Marbach <johannesm@element.io>
Date:   Sat Nov 11 16:08:30 2023 +0100

    Replace worker-loader with built-in Webpack 5 support for web workers
This commit is contained in:
Johannes Marbach 2023-11-13 20:18:00 +01:00
parent bbd449f9f4
commit 432c1d65e1
3 changed files with 3 additions and 20 deletions

View file

@ -293,15 +293,6 @@ module.exports = (env, argv) => {
replace: getThemesImports(),
},
},
{
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?$/,
include: (f) => {
@ -740,6 +731,7 @@ module.exports = (env, argv) => {
// Disable automatic public path as it doesn't appear to function with
// worklets in Webpack 5
// TODO: This appears to break workers though 🤦‍♂️
publicPath: "",
},