Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to PostCSS 8 #9716

Closed
wants to merge 4 commits into from
Closed

Update to PostCSS 8 #9716

wants to merge 4 commits into from

Conversation

ai
Copy link
Contributor

@ai ai commented Sep 28, 2020

Fixed #9664

postcss-loader 4.0 moved PostCSS to peerDependencies

@piecyk
Copy link

piecyk commented Oct 1, 2020

Would be awesome if update to PostCSS 8 would be released with support for custom config #8907 🤞

@iansu iansu added this to the 4.0.1 milestone Nov 16, 2020
@Mancancode
Copy link

hello has the issue with postCSS 8 on '' Create react app '' fix ?

because am still getting errors when i run "npm run build ".

👇🏿👇🏿👇🏿👇🏿👇🏿👇🏿

C:\Users\cilium\Desktop\ebuka\webdev\tailwindCSS> npm run build

tailwindCSS@1.0.0 build C:\Users\cilium\Desktop\ebuka\webdev\tailwindCSS
postcss css/tailwind.css -o public/build/tailwind.css

Error: PostCSS plugin autoprefixer requires PostCSS 8.
Migration guide for end-users:
https://github.com/postcss/postcss/wiki/PostCSS-8-for-end-users
at Processor.normalize (C:\Users\cilium\Desktop\ebuka\webdev\tailwindCSS\node_modules\postcss\lib\processor.js:153:15)
at new Processor (C:\Users\cilium\Desktop\ebuka\webdev\tailwindCSS\node_modules\postcss\lib\processor.js:56:25)
at postcss (C:\Users\cilium\Desktop\ebuka\webdev\tailwindCSS\node_modules\postcss\lib\postcss.js:55:10)
at C:\Users\cilium\Desktop\ebuka\webdev\tailwindCSS\node_modules\postcss-cli\index.js:218:14
at async Promise.all (index 0)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tailwindCSS@1.0.0 build: postcss css/tailwind.css -o public/build/tailwind.css
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tailwindCSS@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\cilium\AppData\Roaming\npm-cache_logs\2020-11-16T16_00_30_816Z-debug.log
PS C:\Users\cilium\Desktop\ebuka\webdev\tailwindCSS>

@clarkd
Copy link

clarkd commented Nov 20, 2020

Changes look good (approving), but the tests seem a bit broken?

@ai
Copy link
Contributor Author

ai commented Nov 20, 2020

@clarkd it was some unrelated error, but for some reason log was already cleaned.

Seems like PR review took too long for CI.

@iansu iansu modified the milestones: 4.0.1, 4.0.2 Nov 23, 2020
@andremonteiro95
Copy link

@iansu is there a release date for the 4.0.2 milestone?

@andremonteiro95
Copy link

The build was failing for me, updating the packages wasn't enough. I had to change the Webpack config to reflect postcss-loader changes, wrapping up some of the options in the postcssOptions key.

{
  // Options for PostCSS as we reference these options twice
  // Adds vendor prefixing based on your specified browser support in
  // package.json
  loader: require.resolve('postcss-loader'),
  options: {
    postcssOptions: {
      // Necessary for external CSS imports to work
      // https://github.com/facebook/create-react-app/issues/2677
      ident: 'postcss',
      plugins: () => [
        require('postcss-flexbugs-fixes'),
        require('postcss-preset-env')({
          autoprefixer: {
            flexbox: 'no-2009',
          },
          stage: 3,
        }),
        // Adds PostCSS Normalize as the reset css with default options,
        // so that it honors browserslist config in package.json
        // which in turn let's users customize the target behavior as per their needs.
        postcssNormalize(),
      ],
    },
    sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
  },
},

@raix
Copy link
Contributor

raix commented Dec 4, 2020

I only saw this PR today - The pull-request #10003 is done as part of the webpack 5 update #9994 and updating postcss dependencies and configuration in general - tests are passing locally etc. just heads up

@ianschmitz
Copy link
Contributor

@ai thanks for the PR. Apologies that this hasn't been adressed sooner. I've merged #10003 as it included the configuration updates, and updated the other related postcss packages.

@ianschmitz ianschmitz closed this Dec 8, 2020
@ai
Copy link
Contributor Author

ai commented Dec 8, 2020

@ianschmitz when do you plan to release it?

I need to add instructions for PostCSS migration docs.

@JimLynchCodes
Copy link

JimLynchCodes commented Mar 14, 2021

@ai this doesn't work for me.

still getting the error:

🚫 Error: PostCSS plugin postcss-nested requires PostCSS 8.

@ai
Copy link
Contributor Author

ai commented Mar 14, 2021

@JimLynchCodes ask CRA team. not me.

They didn’t merged my PR and still do not have PostCSS 8 support #10003

@OmerWow
Copy link

OmerWow commented Mar 16, 2021

@ianschmitz any news regarding this?

@raix
Copy link
Contributor

raix commented Mar 16, 2021

#10003 was reverted #10456 is a retry

@goforbg
Copy link

goforbg commented Apr 9, 2021

Anyone else following this up?

@DevJett
Copy link

DevJett commented May 1, 2021

any news regarding this?

@agusterodin
Copy link

I really hate to add to the noise but to answer the question of why this probably isn't released: webpack 5 support is being worked on as well (see pinned issue).

I would imagine that they want to finish that before pushing a new version of react scripts so breaking changes are consolidated.

@jetro4u
Copy link

jetro4u commented Aug 9, 2021

When will this issue be fixed with CRA?

@raix
Copy link
Contributor

raix commented Aug 9, 2021

released in v5 alpha

@hegelstad
Copy link

@raix react-scripts 5? or webpack 5? this thread is about postcss 8 support in react-scripts

@raix
Copy link
Contributor

raix commented Aug 21, 2021

CRA v5 (currently in alpha, the postcss 8 upgrade was a major version due to node 10 deprecation, therefor it was moved to v5, along webpack 5, node 10+12 deprecation etc.)

@iiLearner
Copy link

are there any plans for this?

@UltiRequiem
Copy link

Bump

Copy link

@sandeep1995 sandeep1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@chenrico
Copy link

chenrico commented Dec 9, 2021

tailwindcss 3.0.0 is on postcss 8! Please support!

@kevinstueber
Copy link

Yes, please! Tailwindcss 3.0 requires postcss 8.

@Aspyryan
Copy link

Please support this for tailwindcss 3.0.0

@billshannon
Copy link

Please support this must have!

@hugovdev
Copy link

Tailwindcss 3.0.0 is on PostCSS 8! Please support!

@raix
Copy link
Contributor

raix commented Dec 12, 2021

#11717

@cheesea3
Copy link

Please support PostCSS for TailwindCSS 3.0.

@MikePrus
Copy link

We need PostCSS for TailwindCSS 3.0. Definitely need to support

@michaelschadhauser
Copy link

Please support PostCSS for TailwindCSS 3.0.

@karlhorky
Copy link

To everyone coming here for Tailwind CSS / PostCSS support, the new version (react-scripts@5.0.0) should support both of these.

Read about the new version and how to upgrade here:

https://github.com/facebook/create-react-app/releases/tag/v5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PostCSS 8