Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

Sourcemaps not working #55

Open
pikeas opened this issue Feb 18, 2020 · 3 comments
Open

Sourcemaps not working #55

pikeas opened this issue Feb 18, 2020 · 3 comments

Comments

@pikeas
Copy link

pikeas commented Feb 18, 2020

Tested by cloning and running the Next.js example.

Screen Shot 2020-02-18 at 13 14 28

Clicking through to utilities.css:1 shows:

Screen Shot 2020-02-18 at 13 14 48

Is there a way to see Tailwind's CSS declarations in a source map for local dev and debugging?

@adamwathan
Copy link
Member

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.

@pikeas
Copy link
Author

pikeas commented Feb 18, 2020

@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?

@pikeas
Copy link
Author

pikeas commented Feb 18, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants