-
Notifications
You must be signed in to change notification settings - Fork 8
/
webpack.dev.config.js
58 lines (50 loc) · 1.39 KB
/
webpack.dev.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
'use strict';
var autoprefixer = require('autoprefixer');
var path = require('path');
var webpack = require('webpack');
module.exports = {
context: path.join(__dirname, 'bundles'),
entry: {
main: './main/main.js',
error: './error/error.js',
signup: './signup/signup.js',
signin: './signin/signin.js',
quest: './quest/quest.js',
quests: './quests/quests.js',
newQuest: './new-quest/new-quest.js',
notification: './notification/notification.js',
user: './user/user.js'
},
output: {
path: path.join(__dirname, 'public'),
filename: '[name].bundle.js',
sourceMapFilename: '[name].bundle.map',
publicPath: 'http://localhost:8080/'
},
devtools: 'eval',
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
exclude: /node_modules/
},
{
test: /\.styl$/,
loader: 'style-loader!css-loader!postcss-loader!stylus-loader'
},
{
test: /\.(gif|png|jpg|svg)$/,
loader: 'file?name=[name].[ext]?[hash]'
}
]
},
plugins: [
new webpack.ProvidePlugin({
fetch: 'imports?this=>global!exports?global.fetch!whatwg-fetch'
})
],
postcss: [
autoprefixer
]
};