Skip to content
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 map support to trace production errors under the bytecode plugin #225

Open
4 tasks done
gauravbordoloi opened this issue Jul 21, 2023 · 2 comments
Open
4 tasks done
Labels
bug Something isn't working enhancement New feature or request

Comments

@gauravbordoloi
Copy link

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

@gauravbordoloi gauravbordoloi added the bug Something isn't working label Jul 21, 2023
@alex8088
Copy link
Owner

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.

@alex8088 alex8088 added the enhancement New feature or request label Jul 22, 2023
@alex8088 alex8088 changed the title Source map support to trace production errors Source map support to trace production errors under the bytecode plugin Jul 22, 2023
@vladyer
Copy link

vladyer commented Sep 18, 2024

any update or advice on this? we use sentry for error tracking and need to ensure source code safety (so enabled bytecode plugin), but it causes source maps in sentry no longer working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants