Skip to content

Commit

Permalink
Move worklet rule up to where it used to be
Browse files Browse the repository at this point in the history
  • Loading branch information
Johennes committed Nov 18, 2023
1 parent e2fddda commit 6093cd8
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,22 @@ module.exports = (env, argv) => {
outputPath: ".",
},
},
{
// Ideally we should use the built-in worklet support in Webpack 5 with the syntax
// described in https://github.com/webpack/webpack.js.org/issues/6869. However, this
// doesn't currently appear to work with our public path setup. So we handle this
// with a custom loader instead.
test: /RecorderWorklet\.ts$/,
type: "javascript/auto",
use: [
{
loader: path.resolve("./recorder-worklet-loader.js"),
},
{
loader: "babel-loader",
},
],
},
{
// This is from the same place as the encoderWorker above, but only needed
// for Safari support.
Expand All @@ -480,22 +496,6 @@ module.exports = (env, argv) => {
outputPath: ".",
},
},
{
// Ideally we should use the built-in worklet support in Webpack 5 with the syntax
// described in https://github.com/webpack/webpack.js.org/issues/6869. However, this
// doesn't currently appear to work with our public path setup. So we handle this
// with a custom loader instead.
test: /RecorderWorklet\.ts$/,
type: "javascript/auto",
use: [
{
loader: path.resolve("./recorder-worklet-loader.js"),
},
{
loader: "babel-loader",
},
],
},
{
// This is from the same place as the encoderWorker above, but only needed
// for Safari support.
Expand Down

0 comments on commit 6093cd8

Please sign in to comment.