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

Breaks on external @import #199

Closed
michaelowens opened this issue Mar 26, 2021 · 7 comments
Closed

Breaks on external @import #199

michaelowens opened this issue Mar 26, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@michaelowens
Copy link

Describe the bug
When using external imports (e.g. Google Fonts) it seems like windi doesn't parse the url properly. I think it might see it as a comment due to // in the url.

Minimal Reproductions
A clean vite/vue/windi set up is enough. I only added a style.css with an @import to a google font:
https://github.com/michaelowens/windi-import-bug

Versions

  • vite-plugin-windicss: 0.10.2
  • vite: 2.1.2
  • framework(vue/react/svelte/etc): vue

Additonal Context
Here you can see it seems to cut off the url:

image

@antfu antfu transferred this issue from windicss/vite-plugin-windicss Mar 27, 2021
@antfu antfu added the bug Something isn't working label Mar 27, 2021
@antfu
Copy link
Member

antfu commented Mar 27, 2021

Fixed with #191

@antfu antfu closed this as completed Mar 27, 2021
@michaelowens
Copy link
Author

michaelowens commented Mar 27, 2021

I have updated to 2.5.6 and the issue persists. I've updated the git repo above to use 2.5.6 where the issue can still be reproduced. @antfu

@antfu antfu reopened this Mar 27, 2021
@antfu antfu closed this as completed in f10adf4 Mar 27, 2021
@michaelowens
Copy link
Author

I see a test was added and it seems to pass successfully, yet after updating the issue still persists in the repo above after updating to 2.5.7.

@schelmo
Copy link
Contributor

schelmo commented Mar 27, 2021

i think vite-plugin-windicss needs to be updated. windicss is included in the build of @windicss/plugin-utils and still is on 2.5.5

@antfu
Copy link
Member

antfu commented Mar 27, 2021

Confirmed we have some externalizing issue in the vite plugin, which should be fixed now. Can you try with v0.10.3? Thanks

@michaelowens
Copy link
Author

Just confirmed it works 🎉 Thanks!

@sooxt98
Copy link

sooxt98 commented Mar 28, 2021

I'm looking for this too XD, i thought something wrong with postcss; fixed by upgrading @windicss/plugin-utils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants