-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
39 lines (34 loc) · 964 Bytes
/
webpack.config.js
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
// `CheckerPlugin` is optional. Use it if you want async error reporting.
// We need this plugin to detect a `--watch` mode. It may be removed later
// after https://github.com/webpack/webpack/issues/3460 will be resolved.
const {
CheckerPlugin
} = require('awesome-typescript-loader')
module.exports = {
entry: "./src/index.ts",
output: {
filename: "ZenGate.js",
path: __dirname + "/dist"
},
// Currently we need to add '.ts' to the resolve.extensions array.
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx']
},
// Source maps support ('inline-source-map' also works)
devtool: 'source-map',
// Add the loader for .ts files.
module: {
loaders: [{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader'
}]
},
target: 'node',
devServer: {
inline: true,
port: 8008
},
plugins: [
new CheckerPlugin()
]
};