-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Source maps broken due to injected __vite__mapDeps function after sourceMappingURL #15338
Comments
With this, there is another issue: I use the plugin @rollup/plugin-babel for transpiling to legacy browsers using the getBabelOutputPlugin mode. The code that Vite adds (__vite__mapDeps) is the only thing that doesn't get transpiled by this plugin because the addition occurs after the execution of the output plugins in Rollup. |
Hi, I'm attempting to fix this issue in the PR #15483. While trying to verify the fix, I noticed that the current behavior (i.e. Could you elaborate how "Source maps broken" in what use case? Having a minimal repro would be also greatly appreciated as current test cases might be weak. |
-> Services like raygun.com can't handle source maps resolution if //# sourceMappingURL is not the last line |
Describe the bug
vite production build includes __vite__mapDeps function after //# sourceMappingURL=index-GR09PQxf.js.map
Reproduction
vite build with sourcemaps
Steps to reproduce
vite build with sourcemaps enabled in vite.config.mjs
build: {
sourcemap: true
},
System Info
Used Package Manager
npm
Logs
Produced prodction JS file:
Validations
The text was updated successfully, but these errors were encountered: