-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
28 lines (27 loc) · 801 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
28 lines (27 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const path = require('path');
const WasmPackPlugin = require('@wasm-tool/wasm-pack-plugin');
const Dotenv = require('dotenv-webpack');
module.exports = (env) => ({
mode: 'development',
entry: {
rubiksMain: './src/js/main.js',
rubiksWorker: './src/js/meet-in-the-middle-worker-rust.js',
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
},
plugins: [
new WasmPackPlugin({
crateDirectory: path.resolve(__dirname, './src/rust'),
extraArgs: "--target bundler --no-typescript",
}),
new Dotenv({
path: `./.env.${env.production ? "production" : "development"}`,
}),
],
experiments: {
syncWebAssembly: true,
},
target: "webworker"
});