-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.config.js
44 lines (42 loc) · 1.2 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 ExtractTextPlugin = require('extract-text-webpack-plugin');
const autoprefixer = require('autoprefixer');
module.exports = {
context: path.join(__dirname, 'pages'),
entry: {
base: './base/base.js',
index: './index/index.js',
authorization: './authorization/authorization.js',
registration: './registration/registration.js',
quest: './quest/quest.js',
userPage: './userPage/userPage.js',
createQuest: './createQuest/createQuest.js',
notFound: './notFound/notFound.js'
},
devtool: 'source-map',
output: {
path: path.join(__dirname, 'public'),
filename: '[name].js',
sourceMapFilename: '[name].map',
publicPath: '/'
},
module: {
loaders: [
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
},
{
test: /\.jpe?g$|\.gif$|\.png$|\.svg/i,
loader: 'file-loader'
}
]
},
plugins: [
new ExtractTextPlugin('[name].css')
],
postcss: () => {
return [autoprefixer];
}
};