diff options
Diffstat (limited to 'webpack.worker.config.js')
-rw-r--r-- | webpack.worker.config.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/webpack.worker.config.js b/webpack.worker.config.js new file mode 100644 index 000000000..f2a2da199 --- /dev/null +++ b/webpack.worker.config.js @@ -0,0 +1,30 @@ +// webpack.worker.config.js +// eslint-disable-next-line @typescript-eslint/no-require-imports +const path = require('path'); + +module.exports = { + mode: 'development', + entry: './src/workers/image.worker.ts', // 👈 Adjust path to your worker file + output: { + filename: 'image.worker.js', + publicPath: '/', + path: path.resolve(__dirname, 'build'), + }, + experiments: { + outputModule: true, + }, + resolve: { + extensions: ['.ts', '.js'], + }, + module: { + rules: [ + { + test: /\.ts$/, + loader: 'ts-loader', + options: { + configFile: 'tsconfig.worker.json', + }, + }, + ], + }, +}; |