-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
56 lines (55 loc) · 1.67 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
45
46
47
48
49
50
51
52
53
54
55
56
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var nodeModulesPath = path.resolve(__dirname, 'node_modules');
var autoprefixer = require('autoprefixer');
module.exports = {
resolve: {
alias: {
}
},
module: {
loaders: [{
test: /\.jsx?$/,
include: [
path.resolve(__dirname, 'static/src'),
path.resolve(__dirname, 'common')
],
exclude: [
nodeModulesPath
],
loader: 'babel-loader!eslint'
}, {
test: /\.less$/,
include: [
path.resolve(__dirname, 'static/src'),
],
loader: 'style!css!parker?filename=./parker-reports/[name].md!csslint?failWarning=false&failOnError=false!postcss-loader!less'
}, {
test: /\.(png|jpg)$/,
include: [
path.resolve(__dirname, 'static/src'),
],
loader: 'url?limit=1000'
}]
},
entry: {
app: ['./static/src/js/app.js'],
vendors: ['babel-polyfill', 'react', 'react-dom', 'redux', 'react-redux', 'jquery', 'keymirror', 'classnames']
},
output: {
path: path.resolve(__dirname, 'static/dist/'),
filename: '[name].js',
publicPath: "/"
},
plugins: [
new webpack.optimize.CommonsChunkPlugin('vendors', '[name].js')
],
postcss: function () {
return [autoprefixer({browsers: ['Android >= 4', 'iOS >= 7', 'last 2 ChromeAndroid versions']})];
},
csslint: {
failWarning: false,
failOnError: false
}
};