-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
61 lines (52 loc) · 1.12 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
'use strict';
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
/**
* Get configuration for Webpack
*
* @see http://webpack.github.io/docs/configuration
* https://github.com/petehunt/webpack-howto
*
* @param {boolean} release True if configuration is intended to be used in
* a release mode, false otherwise
* @return {object} Webpack configuration
*/
module.exports = {
entry: {
app: './src/app.js'
},
output: {
filename: 'app.js',
path: './build/',
publicPatch: './build/'
},
debug: true,
devtool: false,
stats: {
colors: true,
reasons: true
},
plugins: [
new HtmlWebpackPlugin({template: 'src/assets/index.html'})
],
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.js', '.jsx']
},
module: {
loaders: [
{
test: /\.css$/,
loader: 'style!css'
},
{
test: /\.(jpe?g|png|gif|svg)$/i,
loader: 'file-loader?name=[name].[ext]'
},
{
test: /\.js|\.jsx/,
exclude: /node_modules|bower_components/,
loader: 'babel'
}
]
}
};