-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.config.js
More file actions
42 lines (41 loc) · 839 Bytes
/
webpack.config.js
File metadata and controls
42 lines (41 loc) · 839 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
38
39
40
41
42
const path = require('path')
module.exports = {
context: __dirname,
entry: "./src/index.ts",
target: "webworker",
output: {
filename: 'worker.js',
path: path.join(__dirname, 'dist'),
},
resolve: {
alias: {
fs: path.resolve(__dirname, './null.js'),
browser: path.resolve(__dirname, './null.js'),
},
extensions: ['.webpack.js', 'web.js', '.mjs', '.ts', '.tsx', '.js'],
},
node: {
tls: 'empty',
net: 'empty'
},
mode: 'production',
optimization: {
usedExports: true,
},
devtool: 'cheap-module-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'babel-loader',
exclude: /node_modules/,
},
{
type: 'javascript/auto',
test: /\.mjs$/,
include: /node_modules/,
use: []
}
],
},
}