-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.example.js
48 lines (47 loc) · 1.37 KB
/
webpack.example.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
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var autoprefixer = require('autoprefixer');
module.exports = {
entry: './example/example.js',
output: {
path: __dirname + '/example',
filename: 'example.bundle.js',
publicPath: '/lib'
},
resolve: {
extensions: ['', '.jsx', '.css', '.js']
},
devtool: 'source-map',
module: {
loaders: [
{ test: /\.jsx?$/, loader: "babel-loader"},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract(
'style',
'css?importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]',
'postcss-loader'
)
}
]
},
plugins: [
new ExtractTextPlugin('rprogress.css', { allChunks: true })
],
postcss: function () {
return [
autoprefixer({browsers: [
'last 2 Chrome versions',
'last 2 Firefox versions',
'Firefox ESR',
'Firefox 24',
'last 2 Opera versions',
'last 2 Safari versions',
'last 2 iOS versions',
'Explorer >= 10',
'last 2 ChromeAndroid versions',
'Android >= 4.0'
]})
];
}
};