-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
37 lines (36 loc) · 1019 Bytes
/
webpack.config.js
File metadata and controls
37 lines (36 loc) · 1019 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
const WebpackShellPlugin = require('webpack-shell-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
module.exports = {
entry: {
server: './src/index.ts'
},
output: {
filename: '[name].js',
path: __dirname + '/dist'
},
// Enable sourcemaps for debugging webpack's output.
devtool: "source-map",
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: ['.ts', '.js' ]
},
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
use : "awesome-typescript-loader",
},
{
test: /\.js$/,
loader: 'source-map-loader',
enforce: 'pre'
}
]
},
plugins: [
new ForkTsCheckerWebpackPlugin(),
new WebpackShellPlugin({onBuildEnd: ['nodemon dist/server.js --watch dist']})
],
mode: "development"
};