electron-vite
electron-vite copied to clipboard
Source map support to trace production errors under the bytecode plugin
Describe the bug
I am using Sentry for error monitoring and I want to get a proper stacktrace to fix production issues. With bytenode enabled, I am unable to generate source maps.
Sentry throws the below exception
(vite:bytecode plugin) Sourcemap is likely to be incorrect: a plugin (vite:bytecode) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
Any solution to generate source map? Or this is never possible?
Electron-Vite Version
1.0.25
Electron Version
25.3.1
Vite Version
4.4.5
Validations
- [X] Follow the Code of Conduct.
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
You can set build.sourcemap
to true
to generate production source maps.
export default defineConfig({
main: {
build: {
sourcemap: true
}
}
// ...
}
But with the bytecode plugin enabled, there are issues that need to be resolved. Might not be able to make it work.