-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
38 lines (32 loc) · 1.01 KB
/
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
// `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 path = require('path');
var loader = require('awesome-typescript-loader')
var CheckerPlugin = loader.CheckerPlugin;
console.log(CheckerPlugin);
module.exports = {
entry: './index.ts',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
// Currently we need to add '.ts' to the resolve.extensions array.
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx']
},
// Source maps support ('inline-source-map' also works)
devtool: 'source-map',
// Add the loader for .ts files.
module: {
loaders: [
{
test: /\.ts$/,
loader: 'awesome-typescript-loader'
}
]
},
plugins: [
new CheckerPlugin()
]
};