Skip to content

Commit

Permalink
Add postcss-preset-env, remove autoprefixer (facebook#4716)
Browse files Browse the repository at this point in the history
* add postcss-preset-env, remove autoprefixer

* limit to stage 4
  • Loading branch information
heygrady authored and Timer committed Sep 25, 2018
1 parent 87fb78b commit 4ae5dda
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// @remove-on-eject-end
'use strict';

const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
Expand Down Expand Up @@ -57,8 +56,11 @@ const getStyleLoaders = (cssOptions, preProcessor) => {
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
flexbox: 'no-2009',
require('postcss-preset-env')({
autoprefixer: {
flexbox: 'no-2009',
},
stage: 4,
}),
],
},
Expand Down
8 changes: 5 additions & 3 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// @remove-on-eject-end
'use strict';

const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
Expand Down Expand Up @@ -69,8 +68,11 @@ const getStyleLoaders = (cssOptions, preProcessor) => {
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
flexbox: 'no-2009',
require('postcss-preset-env')({
autoprefixer: {
flexbox: 'no-2009',
},
stage: 4,
}),
],
sourceMap: shouldUseSourceMap,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@babel/core": "7.1.0",
"@babel/runtime": "7.0.0",
"@svgr/webpack": "2.4.1",
"autoprefixer": "9.1.5",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
"babel-jest": "23.6.0",
Expand Down Expand Up @@ -55,6 +54,7 @@
"optimize-css-assets-webpack-plugin": "5.0.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-preset-env": "6.0.6",
"postcss-safe-parser": "4.0.1",
"promise": "8.0.2",
"raf": "3.4.0",
Expand Down

0 comments on commit 4ae5dda

Please sign in to comment.