-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.common.js
48 lines (45 loc) · 1.04 KB
/
webpack.common.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
var path = require('path');
var webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js',
publicPath: '/'
},
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel-loader'],
exclude: /node_modules/,
include: __dirname
},
{
test: /\.(png|jpg|svg|woff|woff2|eot|ttf)(\?[a-z0-9]+)?$/,
exclude: /node_modules/,
loaders: ['file-loader'],
},
{
test: /(\.scss$|\.css$)/,
exclude: /node_modules/,
include: path.resolve(__dirname, 'src', 'styles'),
loaders: ['style-loader', 'css-loader', 'sass-loader'],
},
]},
plugins: [
new HtmlWebpackPlugin({
template: path.join(__dirname, 'public', 'index.html'),
}),
new webpack.NamedModulesPlugin(),
],
stats: {
timings: true,
warnings: true,
assets: false,
chunks: false,
colors: false,
errorDetails: false,
hash: false,
version: false,
},
};