tailwindlabs / tailwindcss

A utility-first CSS framework for rapid UI development.
https://tailwindcss.com/
MIT License
80.21k stars 4.04k forks source link

[v4] Sourcemaps not enabled in postcss plugin #13694

Open wesbos opened 1 month ago

wesbos commented 1 month ago

The postcss plugin doesn't write soucemaps when doing the lightning CSS conversion.

I think this is where it needs to happen but trying to patch it with pnpm does not give me sourcemaps, so Im wondering if there is a larger issue

wesbos commented 1 month ago

Looks like you need to explicitly pass the sourcemap from lightning CSS to postcss. Here is a good example: https://github.com/onigoetz/postcss-lightningcss/blob/main/src/index.js#L23-L66

thecrypticace commented 1 month ago

Sourcemaps are still a WIP. We don't track them at all at the moment in v4 but we have a PR for it. I think PostCSS source map support is going to be rather complicated because we're not utilizing the PostCSS AST and will require further research.