-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
48 lines (43 loc) · 878 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
40
41
42
43
44
45
46
47
48
module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:3000',
'./src/index'
],
output: {
path: '/',
filename: 'bundle.js',
publicPath: './'
},
// Currently we need to add '.ts' to the resolve.extensions array.
resolve: {
extensions: ['', '.ts', '.tsx', '.js', '.jsx'],
modulesDirectories: ['node_modules']
},
// Source maps support ('inline-source-map' also works)
devtool: 'inline-source-map',
// Add the loader for .ts files.
module: {
loaders: [
{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader'
},
{
test: /\.css$/,
loader: "style-loader!css-loader"
},
{
test: /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9=&.]+)?$/,
loader: 'file-loader'
},
{
test: /\.(png|jpg|jpeg)$/,
loader: 'file-loader'
},
{
test: /\.scss$/,
loaders: ["style", "css", "sass"]
}
]
}
};