-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Configuration for PostCSS Plugins in NuxtJS doesn't work well with postcss-loader. #9723
Comments
It may be worth having a look at this PR: #9671 |
@danielpost Is this merged BTW? Doesn't look like it |
Thanks for your contribution to Nuxt!
Issues that are labeled as |
hi @Saggitarie . Is it working for you now, or have you migrated to nuxt 3 ? It's not possible for me to check the git history at the moment but I think this bug still exists. |
@SunnyAureliusRichard Would you check with the latest |
Versions
Reproduction
PostCSS loader recommends setting plugins in an array format and treats an object format as deprecation.
See this for reference: Postcss-loader doc
However, NuxtJS configures in object format. This causes inconsistency in the way we configure postcss plugins, so I think this needs to be either way.
According to this warning, NuxtJS recommends to use build.postcss to configure PostCSS plugin. However, postcss-loader uses the external file postcss.config.js to load postcss with parser like sugarss.
Additional Details
Steps to reproduce
This is the nuxt.config.js settings I'm using.
const postcssConfig = {
/ ... PostCSS Plugins Goes Here .../
}
export default {
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
ssr: false,
}
What is Expected?
Being able to parse css written in components levels or global scope levels with parser like sugarss.
Also make the way we specify plugins consistent for both postcss-loaders and nuxtjs.
What is actually happening?
Get this error
Not able to work postcss properly like before with external file.
The text was updated successfully, but these errors were encountered: