Building a for web with vite causes an error when doing a production build #6775
Labels
Platform: Web
This issue is specific to web
Repro provided
A reproduction with a snippet of code, snack or repo is provided
Description
When running in dev with vite everything works fine, when I run the build for production for example with
npm run build && npm run preview
in the repro then I get this errorInitially I ran into this error when working on a new vite framework for storybook but I found the same error present in a users example on the discussions here where it works on dev but fails when serving the static files.
Steps to reproduce
in the repro:
npm run build && npm run preview
to run a preview of the prod buildin general:
Snack or a link to a repository
https://stackblitz.com/edit/vitejs-vite-wcfpnl?file=package.json
same repo from the stack blitz:
https://github.com/dannyhw/vite-reanimated-web-prod-repro
to run here just do
npm install
npm run build && npm run preview
The example code is actually mostly taken from here: #5814
In which disabling strict mode fixes one problem but then in the build theres this new error
Reanimated version
~3.16.3
React Native version
^0.76.3
Platforms
Web
JavaScript runtime
V8
Workflow
None
Architecture
None
Build type
Release app & production bundle
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: