mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Merge pull request #24154 from andybalaam/andybalaam/worker-loader-v3-fix
Explicitly set worker-loader's publicPath to webapp
This commit is contained in:
commit
c39bbb5b85
@ -236,6 +236,15 @@ module.exports = (env, argv) => {
|
|||||||
{
|
{
|
||||||
test: /\.worker\.ts$/,
|
test: /\.worker\.ts$/,
|
||||||
loader: "worker-loader",
|
loader: "worker-loader",
|
||||||
|
options: {
|
||||||
|
// worker-loader v3 defaults to output.publicPath here,
|
||||||
|
// which causes worker.js to be included in the bundle
|
||||||
|
// in R2. This in turn causes CSP to fail when loading
|
||||||
|
// the worker.
|
||||||
|
// So, we explicitly ask to include it in the webapp
|
||||||
|
// dir.
|
||||||
|
publicPath: "webapp",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(ts|js)x?$/,
|
test: /\.(ts|js)x?$/,
|
||||||
|
Loading…
Reference in New Issue
Block a user