-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.babel.js
55 lines (54 loc) · 1.11 KB
/
webpack.config.babel.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
49
50
51
52
53
54
55
import path from 'path';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
export default {
context: path.resolve('./src'),
entry: {
app: './index'
},
module: {
loaders: [
{
test: /\.html$/,
exclude: /node_modules/,
loader: 'raw-loader'
},
{
test: /\.(png|jpg|gif)$/,
exclude: /node_modules/,
loader: 'file-loader'
}
],
preloaders: [
{
test: /(\.jsx$)|(\.js$)/,
exclude: /node_modules/,
loader: 'eslint-loader'
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve('./src/index.html'),
filename: 'index.html',
favicon: 'assets/favicon.ico',
inject: 'body',
hash: true
}),
new ExtractTextPlugin('bundle.css')
],
resolve: {
root: __dirname,
modulesDirectories: [
'node_modules',
'./src/components',
'./src/actions',
'./src/reducers',
'./src/types'
],
extensions: ['', '.js', '.jsx']
},
eslint: {
configFile: '.eslintrc'
}
};