Open Jfoltz-adobe opened 3 months ago
Looks like the issue is in this file: https://github.com/BuilderIO/mitosis/blob/main/packages/core/src/generators/lit/collect-class-string.ts
It looks like some of the dynamic class strings include string template markers. I was able to get this working locally by updating: https://github.com/BuilderIO/mitosis/blob/main/packages/core/src/generators/lit/generate.ts
All I had to do was strip string template characters like this:
collectClassString(json)?.replace(/`/g,'');
So I'm guessing something changed in the class string data that started including template tags. The simplest fix was just to strip them but it might be a sign of a bigger regression.
This is specific to class
for some reason:
@raymondmuller is the one who wrote the Sveltosis parser, not sure what the reason was for this special behaviour 🤔
I am interested in helping provide a fix!
Yes
Which generators are impacted?
Reproduction case
https://mitosis.builder.io/playground/?code=DwZwxgTglgDgLgPgFAAIVgPYDsR3QGwEMQQA5QgWwFMUBeFAcgBNCIBrBgbiWAHpxo8ZDyZQAbgWIhaAbzBES5agF9kaNKHwY8vZH1FjkQA%3D
Expected Behaviour
Should compile correctly
Actual Behaviour
Additional Information
In the playground the svelte templates don't appear to be working