-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.cjs
54 lines (49 loc) · 1.36 KB
/
webpack.config.cjs
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
43
44
45
46
47
48
49
50
51
52
53
54
const path = require('path');
const resolve = require('enhanced-resolve');
module.exports = {
entry: {
control : {
import: './src/control_entry.ts',
filename: 'control_worker.js',
},
overlay : {
import: './src/overlay_entry.ts',
filename: 'overlay_controller.js',
},
},
output: {
path: path.resolve(__dirname, 'public/assets/js'),
},
devtool: "inline-source-map"
};
// module.exports.stats = { errorDetails: true };
module.exports.module = {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
]
};
module.exports.resolve = {
modules: ['src', 'node_modules'],
importsFields: ['imports'],
extensions: ['.ts', '.js'],
// exclude : ['*.test.ts'],
fallback: {
// "stream": require.resolve("stream-browserify"),
// "crypto": require.resolve("crypto-browserify"),
// "http": require.resolve("stream-http"),
// "https": require.resolve("https-browserify"),
// "zlib": require.resolve("browserify-zlib"),
"assert": require.resolve("assert/"),
// "net" : require.resolve("net-browserify"),
// "path": require.resolve("path-browserify"),
// "tls": require.resolve("tls-browserify"),
// "os": require.resolve("os-browserify/browser")
}
};
module.exports.optimization = {
usedExports: true
};