-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathwebpack.config.js
More file actions
35 lines (34 loc) · 894 Bytes
/
webpack.config.js
File metadata and controls
35 lines (34 loc) · 894 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
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
const CopyPlugin = require('copy-webpack-plugin')
module.exports = [
{
mode:'development',
entry:'./client',
target: 'web', //https://gist.github.com/msafi/d1b8571aa921feaaa0f893ab24bb727b
output:{
filename:"index.js",
path: __dirname + '/build/client'
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
plugins: [
new NodePolyfillPlugin(),
new HtmlWebpackPlugin({
filename: 'index.html',
template: './public/index.html',
}),
]
}
]