Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !1771

Adding plugin postcss-flexbugs-fixes and flexbox: 'no-2009' to Autoprefixer

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/cr101/master into master 8 years ago
  • Overview 6
  • Commits 4
  • Pipelines 0
  • Changes 3

Created by: cr101

This PR adds the postcss-flexbugs-fixes plugin to fix all flexbug's issues. It also adds flexbox: 'no-2009' to Autoprefixer which adds prefixes only for final and IE versions of specification. Currently this PR only partially avoids old CSS flexbox. In order to fully pass the Lighthouse 'Avoids old CSS flexbox' audit test as well as being able to match the targeted browser versions of a CSS framework (i.e. when compiling Bootstrap 4 SASS as per this comment we need to provide browserslist from package.json to Autoprefixer (this particular issue appears to be related to #892)

This PR partially fixes #1658 until #892 is fixed.

Compare
  • master (base)

and
  • latest version
    41ca9644
    4 commits, 2 years ago

3 files
+ 5
- 0

    Preferences

    File browser
    Compare changes
packages/re‎act-scripts‎
con‎fig‎
webpack.co‎nfig.dev.js‎ +2 -0
webpack.con‎fig.prod.js‎ +2 -0
packag‎e.json‎ +1 -0
packages/react-scripts/config/webpack.config.dev.js
+ 2
- 0
  • View file @ 41ca9644

  • Edit in single-file editor

  • Open in Web IDE


@@ -197,6 +197,7 @@ module.exports = {
options: {
ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
browsers: [
'>1%',
@@ -204,6 +205,7 @@ module.exports = {
'Firefox ESR',
'not ie < 9', // React doesn't support IE8 anyway
],
flexbox: 'no-2009',
}),
],
},
packages/react-scripts/config/webpack.config.prod.js
+ 2
- 0
  • View file @ 41ca9644

  • Edit in single-file editor

  • Open in Web IDE


@@ -202,6 +202,7 @@ module.exports = {
options: {
ident: 'postcss', // https://webpack.js.org/guides/migrating/#complex-options
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
browsers: [
'>1%',
@@ -209,6 +210,7 @@ module.exports = {
'Firefox ESR',
'not ie < 9', // React doesn't support IE8 anyway
],
flexbox: 'no-2009',
}),
],
},
packages/react-scripts/package.json
+ 1
- 0
  • View file @ 41ca9644

  • Edit in single-file editor

  • Open in Web IDE


@@ -51,6 +51,7 @@
"inquirer": "3.0.6",
"jest": "19.0.2",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "2.1.0",
"postcss-loader": "1.3.3",
"promise": "7.1.1",
"react-dev-utils": "^0.5.2",
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
3
CLA Signed tag: breaking change tag: enhancement
3
CLA Signed tag: breaking change tag: enhancement
    Assign labels
  • Manage project labels

Milestone
1.0.0
1.0.0
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Administrator
Reference: facebook/create-react-app!1771
Source branch: github/fork/cr101/master

Menu

Explore Projects Groups Snippets