Open pikeas opened 4 years ago
There actually is no CSS source for Tailwind’s utilities, they are all generated dynamically in JS during build based on your config. So a source map would just be pointing to a bunch of loops in a JS file somewhere, hah.
Any particular problem you’re having that made you open this issue? Maybe can help solve it in another way.
@adamwathan Thanks for the quick reply!
I haven't used Tailwind in a long while, so I'm pretty rusty on the various classes. When iterating on a frontend design, source maps in-browser are a much tighter loop than dipping out to documentation.
Tailwind generates CSS as its final output - would it be possible to treat this as the source map, or does PostCSS preclude that?
If source maps are impossible, it would be great to call this out in the installation docs - I spent a half day trying to figure out why TW's source maps weren't working.
Tested by cloning and running the Next.js example.
Clicking through to
utilities.css:1
shows:Is there a way to see Tailwind's CSS declarations in a source map for local dev and debugging?