-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Treat missing source map sources as non-fatal during SSR #2892
Comments
Encountered the same issue with svelte material where @material/drawer doesn't ship the ts files |
I hope it would continue to warn, but I agree this should not be an error. It is helpful to know when source maps are broken so that they can be fixed. Supabase fixed their sourcemaps as a result of this being surfaced supabase/supabase-js#153 |
This is breaking for me as well, and no clear path to fix - there are a fair amount of dependencies with bad source maps that make it difficult to fix 1 by 1. Is there a way to disable source maps from |
@mscolnick best way rn is to delete sourcemaps from node_modules, something like this could work
|
@unlocomqx thanks for the suggestions, although, we are in a Bazel monorepo right now which makes that quite difficult and would effect other non-Vite projects |
This seems to be fixed now. Here's a stackblitz link to reproduce it. The logs now show:
without crashing. |
Clear and concise description of the problem
Some NPM packages include source maps that reference sources which were not included as part of the package. For example, the Material Components reference the original Typescript sources in their source maps. When loading such a module for SSR, the missing sources cause Vite to throw an error.
A simple repro (after installing
vite
and@material/ripple
):results in:
Suggested solution
Ignore missing sources in source maps.
Additional context
I ran into this issue when trying to set up SvelteKit with Material Components. I think it's not uncommon for packages to not ship sources that are referenced in source maps so it would be nice for Vite to ignore such situations instead of having package authors fix their source maps.
The text was updated successfully, but these errors were encountered: