-
Notifications
You must be signed in to change notification settings - Fork 7
/
webpack.dev.config.js
51 lines (49 loc) · 1.41 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
const autoprefixer = require('autoprefixer');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
var stylusLoader = ExtractTextPlugin.extract("style-loader", "css-loader!stylus-loader");
module.exports = {
context: path.join(__dirname, 'views'),
entry: {
base: './base.js',
navbar: './partials/navbar.js',
footer: './partials/footer.js',
slider: './partials/slider.js',
addQuest: './quest/addQuest.js',
questPage: './quest/questPage.js',
authForm: './auth/authForm.js',
profile: './profile/profile.js',
editProfile: './profile/editProfile.js',
quests: './pageQuests/questslist.js',
error: './error.js'
},
devtool: 'source-map',
output: {
path: path.join(__dirname, 'public'),
filename: '[name].js',
sourceMapFilename: '[name].map',
publicPath: '/'
},
module: {
loaders: [
{
test: /\.styl$/,
loader: stylusLoader
},
{
test: /(\.png$)|(\.jpg$)|(\.jpeg$)|(\.gif$)/,
loader: 'file-loader'
},
{
test: /\.svg$/,
loader: 'svg-url-loader'
}
]
},
plugins: [
new ExtractTextPlugin('[name].css')
],
postcss: () => {
return [autoprefixer];
}
};