-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better preservation/fallback of/for source maps #377
Comments
this causes issues with vite, eg. https://github.com/sveltejs/kit/issues/1745 (I also saw it happen with windicss), so i'm in favor of providing sourcemaps where possible. In case of postcss i'm sure that it does provide sourcemaps, so it should be possible to pass them on. The case where a preprocessor does not return a sourcemap should/could be handled in svelte core instead. |
Addendum: I think svelte-preprocess itself is a bit of a special case due to it's internal handling of multiple preprocess steps with a single preprocessor ( |
Are you sure about this? If so, we should fix that. I thought that it did though. I remember @milahu trying to fix some issues with the line numbers being a bit off in #286, so I'd expect it was returning something at some point. He also had started on some improvements in the postcss css repo postcss/postcss#1487, but they were not completed/merged |
No honestly I'm not sure about it 😄 I adjusted the wording |
FWIW @dominikg had implemented this for vite-plugin-svelte a while ago. It's under the experimental options though and I've never heard anyone using it. But if it works, the code could be re-used internally here or in Svelte core too. |
Is your feature request related to a problem? Please describe.
Some preprocessors might not return a source map. This breaks the "chain" of source maps and the result is that positions due to errors for example cannot be mapped correctly anymore.
Describe the solution you'd like
Investigate if there's a possibility to provide somewhat sane fallbacks for Style and Script preprocessors, like "return a source map that indicates that script/style now has this length instead of the previous one". Don't know how to phrase this better, just an idea.
How important is this feature to you?
Nice to have
The text was updated successfully, but these errors were encountered: