-
-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathwebpack.config.js
More file actions
41 lines (39 loc) Β· 789 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
41 lines (39 loc) Β· 789 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
const path = require('path')
const webpack = require('webpack')
const mode = process.env.NODE_ENV || 'production'
module.exports = {
output: {
filename: `worker.${mode}.js`,
path: path.join(__dirname, 'dist'),
},
mode,
resolve: {
extensions: ['.ts', '.tsx', '.js'],
plugins: [],
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
options: {
transpileOnly: true,
},
},
{ enforce: 'pre', test: /\.js$/, loader: 'source-map-loader' },
{
test: /\.ya?ml$/,
use: [
{
loader: '@friends-of-js/yaml-loader',
options: { useNodeEnv: false },
},
],
},
],
},
node: {
fs: 'empty',
net: 'empty',
},
}