forked from jackreichert/a-wp-react-redux-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
30 lines (29 loc) · 858 Bytes
/
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
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const autoPrefixer = require('autoprefixer');
module.exports = {
entry: './src/index.js',
output: {
path: __dirname,
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'stage-2', 'react']
}
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('style-loader', 'css!sass!postcss?sourceMap')
}
]
},
plugins: [
new ExtractTextPlugin("bundle.css", {allChunks: true})
],
postcss: [autoPrefixer({browsers: ['last 3 versions']})]
};