-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
33 lines (33 loc) · 897 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
module.exports = {
entry: './src/index.tsx',
output: {
filename: 'bundle.js',
path: __dirname + '/dist'
},
devtool: 'source-map',
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json']
},
module: {
rules: [
{ test: /\.tsx?$/, loader: 'awesome-typescript-loader' },
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{
test: /\.(jpg|jpeg|gif|png)$/,
loader:'url-loader?limit=1024&name=images/[name].[ext]'
},
{
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/'
}
}]
},
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
{ enforce: 'pre', test: /\.js$/, loader: 'source-map-loader' }
]
}
};