Router Devtools visible in vite production build #4123
florianmartens
started this conversation in
General
Replies: 1 comment
-
cc @birkskyum |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there,
Just noticed that the docs say this:
But this is not a universal statement. Vite (very popular atm) does not inject
NODE_ENV
into the browser runtime. Insteadimport.meta
is used in the module scope. These are not respected by the Devtools by default. I had to conditionally hide the Devtools to make it work.I wasn't able to exclude the Devtools from the build.
In my package.json I tried:
I now still have the problem that the devtools are included in my production build and probably have to do a dynamic import.
Any way to solve this in a more native way?
Is this intended or should the docs be updated?
Beta Was this translation helpful? Give feedback.
All reactions