forked from efuller/modern-wp-with-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
36 lines (35 loc) · 864 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
31
32
33
34
35
36
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var autoprefixer = require('autoprefixer');
module.exports = {
entry: [
'./app/index.js'
],
output: {
path: __dirname + '/assets',
filename: "scripts.js"
},
resolve: {
extensions: ['', '.js', '.html', '.scss']
},
module: {
loaders: [
{
test: /\.js$/,
exclude: '/node_modules/',
loader: 'babel-loader'
},
{
test: /\.(css|scss)$/,
loader: ExtractTextPlugin.extract('css!postcss!sass')
}
]
},
postcss: [autoprefixer],
plugins: [
new ExtractTextPlugin("style.css", {
allChunks: true
})
],
devtool: 'inline-source-map'
};