Skip to content

Commit

Permalink
update webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
echenley committed Sep 17, 2015
1 parent e61d07d commit eb9c29d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var friendlyFormatter = require('eslint-friendly-formatter');
var autoprefixer = require('autoprefixer');

module.exports = {
entry: [
Expand All @@ -18,14 +19,21 @@ module.exports = {
{
test: /\.(js|jsx)$/,
include: path.join(__dirname, 'src'),
loaders: ['react-hot', 'babel-loader', 'eslint-loader']
loaders: ['react-hot', 'babel', 'eslint']
},
{
test: /\.scss$/,
loader: 'style!css!sass'
loader: 'style!css!postcss!sass'
},
{
test: /\.svg$/,
loader: 'svg-inline'
}
]
},
postcss: function () {
return [autoprefixer({ browsers: ['last 3 versions'] })];
},
eslint: {
formatter: friendlyFormatter,
},
Expand Down
12 changes: 10 additions & 2 deletions webpack.production.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var autoprefixer = require('autoprefixer');

module.exports = {
entry: [
Expand All @@ -15,14 +16,21 @@ module.exports = {
{
test: /\.(js|jsx)$/,
include: path.join(__dirname, 'src'),
loaders: ['babel-loader']
loaders: ['babel']
},
{
test: /\.scss$/,
loader: 'style!css!sass'
loader: 'style!css!postcss!sass'
},
{
test: /\.svg$/,
loader: 'svg-inline'
}
]
},
postcss: function () {
return [autoprefixer({ browsers: ['last 3 versions'] })];
},
resolve: {
extensions: ['', '.js', '.jsx', '.json']
},
Expand Down

0 comments on commit eb9c29d

Please sign in to comment.