-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
35 lines (35 loc) · 1.46 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
module.exports = {
entry: __dirname + '/source/js/app.js',
output: {
path: __dirname + '/dist/js',
publicPath: '/assets/',
filename: 'bundle.js'
},
devtool: 'source-map',
devServer: {
contentBase: './dist',
colors: true,
progress: true
},
jshint: {
'esnext': true
},
module: {
preLoaders: [
{ test: /\.js?/, exclude: __dirname + '/node_modules', loaders: ['eslint'] }
],
loaders: [
{ test: /\.scss$/, loaders: ['style', 'css', 'sass'] },
{ test: /\.js$/, loader: 'babel', exclude: __dirname + '/node_modules' },
{ test: /bootstrap\/js\//, loader: 'imports?jQuery=jquery' },
{ test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/font-woff' },
{ test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/font-woff' },
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/octet-stream' },
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=image/svg+xml' },
{ test: /\.png(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000' },
{ test: /\.jpg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000' },
{ test: /\.gif(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000' },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file' }
]
}
};