Closed GiveMe-A-Name closed 3 weeks ago
That's not valid CSS afaik. You should run Vue-loader before lightingcss so it is compiled first.
Or Vue loader should be more resilient. The output CSS is equivalent according to the CSS spec. Which quotes you use should not matter.
The css code:
After
lightningcss
transform, the custom css would be double-quoted first. The single-quoted can't be maintained.v-bind("color ? \"red\": \"green\"")
would transform intocolor: var(--7ba5bd90-color\ \?\ \\\"red\\\"\:\ \\\"green\\\");
by vue-loader. It's not expected.Example in Lightningcss playground
Reference issue: https://github.com/web-infra-dev/rsbuild/issues/3595#issuecomment-2421679239