Repository navigation
Expand file tree
/
Copy pathwebpack.config.js
More file actions
66 lines (65 loc) · 1.6 KB
/
Copy pathwebpack.config.js
File metadata and controls
66 lines (65 loc) · 1.6 KB
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
59
60
61
62
63
64
65
66
/**
* Created by wujianbo on 15/12/9.
*/
var autoprefixer = require('autoprefixer');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var autoprefixerOptions = {
browsers: [
'ie >= 8',
'ie_mob >= 10',
'ff >= 30',
'chrome >= 34',
'safari >= 7',
'opera >= 23',
'ios >= 7',
'android >= 4.4',
'bb >= 10'
]
};
module.exports = {
module: {
loaders: [
{
test: /\.(js|jsx)$/,
exclude: /(node_modules)/,
loader: 'babel',
query: {
cacheDirectory: true,
presets: ['es2015', 'react']
}
},
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.css$/,
exclude: /(node_modules)/,
loader: 'style-loader!css-loader'
},
{
test: /\.less$/,
exclude: /(node_modules)/,
loader: 'style-loader!css-loader!postcss-loader!less-loader'
},
{
test: /\.scss$/,
loaders: ["style", "css", "sass"]
}
]
},
postcss: function () {
return [autoprefixer(autoprefixerOptions)];
},
plugins: [
//new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings: false
// },
// output: {
// comments: false
// }
//})
]
};