Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use postcss by config
  • Loading branch information
awinogradov committed Apr 24, 2017
commit d83a1687431ba030220f377fbd396d0937f0524b
18 changes: 1 addition & 17 deletions packages/bem-react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
// @remove-on-eject-end
'use strict';

const autoprefixer = require('autoprefixer');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
Expand Down Expand Up @@ -213,22 +212,7 @@ module.exports = {
importLoaders: 1,
},
},
{
loader: 'postcss-loader',
options: {
ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options
plugins: () => [
autoprefixer({
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9', // React doesn't support IE8 anyway
],
}),
],
},
},
{ loader: 'postcss-loader' },
],
},
// ** STOP ** Are you adding a new loader?
Expand Down
18 changes: 1 addition & 17 deletions packages/bem-react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
// @remove-on-eject-end
'use strict';

const autoprefixer = require('autoprefixer');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
Expand Down Expand Up @@ -222,22 +221,7 @@ module.exports = {
importLoaders: 1,
},
},
{
loader: 'postcss-loader',
options: {
ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options
plugins: () => [
autoprefixer({
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9', // React doesn't support IE8 anyway
],
}),
],
},
},
{ loader: 'postcss-loader' },
],
},
extractTextPluginOptions
Expand Down
12 changes: 12 additions & 0 deletions packages/bem-react-scripts/template/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
plugins: [
require('autoprefixer')({
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9', // React doesn't support IE8 anyway
],
}),
],
};