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

postcss.plugin was deprecated. Migration guide #350

Closed
tvvignesh opened this issue Dec 24, 2020 · 3 comments · Fixed by #357
Closed

postcss.plugin was deprecated. Migration guide #350

tvvignesh opened this issue Dec 24, 2020 · 3 comments · Fixed by #357

Comments

@tvvignesh
Copy link

Hi. I recently upgraded to "postcss": "8.2.1" with "rollup-plugin-postcss": "^4.0.0" and I see that I get a lot of warnings like this when minimize is set to true:

postcss({
	minimize: true
})

1

And eventually creates errors in the CSS files:

2

But if I don't add minimize I do not get these warnings, nor does anything fail.

Thanks.

@litt1e-p
Copy link

litt1e-p commented Mar 3, 2021

the same +1

@ludofischer
Copy link
Contributor

I think removing minimize fixes the warning because the minimize option activates cssnano, and the current cssnano uses the old PostCSS API.

@andykenward
Copy link

andykenward commented Apr 9, 2021

Even without minimize I am getting that error #350 (comment). :(

I am using

"node": "14.6.0",
"npm": "7.8.0",

It's the conflict of postcss versions in

"rollup-plugin-postcss" : "^4.0.0"

using

"postcss": "8.x"

and

"cssnano": "^4.1.10"

using

"postcss": "^7.0.0"

Downgrading to rollup-plugin-postcss ^3.1.8 fixed the issue for me.

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

Successfully merging a pull request may close this issue.

4 participants