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

vite-plugin-windicss transformCSS error and HMR error with vite-plugin-restart #282

Open
yunsii opened this issue Feb 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@yunsii
Copy link

yunsii commented Feb 14, 2022

Describe the bug

When use background with data:image/svg+xml;utf8 url in pseudo class like this:

// less and
// transformCSS: true
&::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' transform='translate(5,5)'><rect width='14' height='14' style='fill:rgb(62, 207, 142)' rx='24'/><path style='fill:rgb(255,255,255)' d='M9.6 4.2a.5.5 0 01.9.6l-3.6 5c-.1.2-.4.3-.7.1L3.7 7.4a.5.5 0 11.6-.8l2 1.2 3.3-3.6z'/></svg>");
  background-size: cover;
  content: '';
}

render css:

image

transformCSS: false work well.

Otherwise, when I use vite-plugin-restart, less file HMR will not work.

Minimal Reproductions

https://github.com/yunsii/vite-react/tree/test/vite-plugin

start and open: http://localhost:8000/vite-react/welcome

Versions

  • vite-plugin-windicss: 1.6.3
  • vite: 2.7.1
  • framework(vue/react/svelte/etc): react
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

1 participant