-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
44 lines (41 loc) · 1.09 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
'use strict';
const path = require('path');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
let config = {
// context: path.resolve(__dirname, 'src'),
// entry: './index.js',
entry: './src/index.js',
output: {
path: __dirname,
filename: 'whatap.bundle.js'
},
module: {
plugins: [
new FaviconsWebpackPlugin('favicon.ico'),
],
loaders: [
{
test: /\.ico$|\.jpe?g$|\.gif$|\.png$|\.svg$/,
loader: 'file-loader?name=[name].[ext]'
},
{
test: /\.svg$/,
loader: 'raw-loader'
},
{
test: /\.css$/,
loader: 'style!css'
},
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/,
query: {
cacheDirectory: true,
presets: ['es2015', 'stage-0', 'react'] //'stage-0',
}
}
]
}
};
module.exports = config;