-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
36 lines (35 loc) · 863 Bytes
/
webpack.config.js
File metadata and controls
36 lines (35 loc) · 863 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
const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
mode: 'development',
entry: './index.ts',
entry: path.resolve(__dirname, 'index.ts'),
target: 'node',
node: {
__filename: false,
__dirname: false,
},
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
include: [__dirname],
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.js', '.ts'],
alias: {},
},
externals: [
nodeExternals({
whitelist: /^@casual-simulation/,
}),
], // in order to ignore all modules in node_modules folder
};