From 6093cd8fe815c4633cf7eb0ae5a7acee366c021b Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Sat, 18 Nov 2023 21:39:17 +0100 Subject: [PATCH] Move worklet rule up to where it used to be --- webpack.config.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 3e3e6e5c54..6eaad01930 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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. @@ -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.