-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
37 lines (35 loc) · 991 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
37 lines (35 loc) · 991 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
29
30
31
32
33
34
35
36
37
const path = require('path');
const WasmPackPlugin = require('@wasm-tool/wasm-pack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const distPath = path.resolve(__dirname, "dist");
module.exports = {
target: 'electron-renderer',
mode: 'development',
entry: {
app: `${distPath}/bootstrap.js`,
background: `${distPath}/main.js`,
},
output: {
path: distPath,
filename: "[name].js",
webassemblyModuleFilename: "integrated_spreadsheet_environment.wasm",
},
module: {
rules: [{
test: /\.wasm$/,
include: [/node_modules/],
use: [ { loader: 'wasm-loader'} ]
}]
},
// entry: { gui: `${distPath}/integrated_spreadsheet_environment.js` },
plugins: [
new CopyWebpackPlugin([
{ from: './static', to: distPath }
]),
new WasmPackPlugin({
crateDirectory: path.resolve(__dirname, "."),
extraArgs: "--no-typescript",
}),
],
};