-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
plugin-react
: Fails to bundle @sentry/react
if mode
is not production
#9363
Comments
From looking into it more, it seems like using |
Which probably would be why it also seems to cause |
Had the same problem. What helps is to set the environment variables // package.json
{
// ...
"scripts": {
// ...
"build": "cross-env NODE_ENV=production tsc && vite build",
// ...
},
// ...
} I also think the |
Had the same problem. Solved by adding
|
I think it can be simplified by just adding this.
|
I am still having the issue with |
Describe the bug
I am using Vite in a project using
@sentry/react
, and when Ivite build
the project with a--mode
other thanproduction
it fails with the message seen in the Logs section.I've tried to use the
exclude
option to exclude/node_modules/
and various other paths but they did not make a difference.This only happens with
plugin-react
included and usingjsxRuntime: 'automatic'
Reproduction
https://github.com/BeeeQueue/vite-sentry-repro/actions/runs/2732156122
System Info
Used Package Manager
pnpm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: