-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Unable to configure the built in postcss-import
plugin
#16669
Comments
Start a new pull request in StackBlitz Codeflow. |
I'm curious why |
It's totally a valid solution that will solve the problem, just wasn't entirely obvious based on the documentation that exists. The docs mention PostCSS is used and how to configure it, but nothing about what is already configured and what can't be changed. My thought process was realising PostCSS is present, realising it could be configured, realising it didn't work, then having to look through source to figure out why. I'll close this ticket since there is a suggested solution. Thanks for the responses. |
Describe the bug
I was looking to add additional paths to the
postcss-import
paths
configuration, but it seems like this is impossible. I was planning to use this to add multiple packages worth of CSS into the process and allow them all to be referenced, without huge folder traversing paths.I assume that the answer to this would be to use
resolve.alias
in the Vite config file. This is possible, however in my project I am pulling together 3 or 4 other libraries which have CSS, so I would need to have a different alias for each, whereas if I can add to the paths array this can be resolved elsewhere.I have tried a few things
Reproduction
https://stackblitz.com/edit/vitejs-vite-uae7yh?file=css%2Flvl1%2Flvl2%2Findex.css
Steps to reproduce
The nature of the issue makes it difficult to provide concrete steps.
However, the linked StackBlitz shows a version of my usecase, where I would like to be able to add the nested folder structure to the paths checked for imports. While this could be done with
resolve.alias
once I have 3 or more of these, this starts to become unwieldy.System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: