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

Warning with Vite 3 #160

Closed
ak-14 opened this issue Jul 22, 2022 · 6 comments
Closed

Warning with Vite 3 #160

ak-14 opened this issue Jul 22, 2022 · 6 comments

Comments

@ak-14
Copy link

ak-14 commented Jul 22, 2022

Hi,

We've recently migrated to Vite 3 and started seeing the following warning when we include postcss-rtlcss in our postcss.config file:

"A PostCSS plugin did not pass the from option to postcss.parse. This may cause imported assets to be incorrectly transformed. If you've recently added a PostCSS plugin that raised this warning, please contact the package author to fix the issue."

This is the PR that introduced this warning:
vitejs/vite#8183

Can this cause unexpected issues later on and can it be fixed?

Thanks!

@elchininet
Copy link
Owner

Hi @ak-14,
The parse method in this plugin is not used in any rule that is coming from a file but in dynamic rules that are created on the fly, so it is hard to specify the from parameter of these rules. But anyway it would be good to have a reproducible example to see if it can be mocked to avoid the warning. Please, provide me with the repository in which you are creating the migration to reproduce it or create a minimum reproducible repository for the same.
Regards

@ak-14
Copy link
Author

ak-14 commented Jul 23, 2022

Hi @elchininet
Thank you for responding so quickly. I created a minimum reproducible repository in the link below:
https://github.com/ak-14/postcss-rtlcss-issue-160

@elchininet
Copy link
Owner

Hi @ak-14,
I‘ve tried to mock the from property without any success, the warning is still there. I‘ll open a discussion in the Vite repo to get some feedback. I‘ll update you.
Regards

@elchininet
Copy link
Owner

Hi @ak-14,
You can follow the discussion here: vitejs/vite#9339
Regards.

@ak-14
Copy link
Author

ak-14 commented Jul 24, 2022

Hi @elchininet
Thank you very much for taking the time to look into this issue and possible workarounds for it. I will be following up with the discussion you mentioned and we will continue to depend on postcss-rtlcss in our projects.

@elchininet
Copy link
Owner

Hi @ak-14,
I already updated the issue. I forgot two places in which that method was being used, with these changes the warning is gone.
You can try version 3.7.2 of the package.
Regards.

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

No branches or pull requests

2 participants