Missing option to specify quote handling #968
Unanswered
PieterBoeren
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, I'm not sure this is a missing feature or intended behavior of tsdown or rolldown, but since I use tsdown in the end, I first try it here:
I'm missing a feature/option to specify how to handle quotes. If I'm not mistaken, I see it as configurable in
oxc_codegen, however it is not possible to configure it in tsdown (if it is: please let me know how).The issue I have is that I have a TypeScript file with strings like:
'has-[>[data-pc-section="footer"]:empty]:pt-0'(tailwind classes). When tsdown processes this, I end up with"has-[>[data-pc-section=\"footer\"]:empty]:pt-0"in my esm bundle:This is valid JavaScript, but the issue is that it breaks Tailwind's ability to detect the classes and I end up with a non-working implementation.
Would it be possible to control this behavior by a configuration (for now I've written a small plugin which replaces all
\"after bundling, not ideal)?Beta Was this translation helpful? Give feedback.
All reactions