Closed
Description
I have a react app with the lib mode activated in my vite config.
I use import.meta.env.mode
then build the app.
When I use the library in an other app I get :
Uncaught SyntaxError: Unexpected string
steps to reproduce:
1- install dependencies
pnpm install
2- build the library :
pnpm build
3- In main.jsx, uncomment line 4 and comment line 3
4- start the dev server
pnpm dev
5- check the console in Chrome
Uncaught SyntaxError: Unexpected string
and the webpage shows nothing
Expected behaviour :
The web page displays "yay production" in prod and "not production" in dev mode.
I reproduced it with a Firefox and Chrome.