-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Open
Labels
Description
Clear and concise description of the problem
CSS sourcemaps aren't currently supported, which can make it difficult to track down where a particular style was authored. It would be cool if they were preserved in both build (<link>) and dev (<style>) mode.
You can see this with a vanilla app (npm init @vitejs/app and choose 'vanilla'), and inspecting the #app styles in both dev and serve. In dev:
In serve:
Ideally the top right would say 'style.css' in both cases.
Suggested solution
I don't pretend to know exactly what would be involved, but elsewhere in the codebase magic-string is used for a similar purpose. Presumably the relevant plugin is https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/css.ts. I could take a run at it if someone gave me a pointer or two.
AlttiRi, cretueusebiu, mdizo, john-fire, goldnead and 96 morealexis-gss, silverwind, joaopedrodcf and Lalem001

