I am building a Shopify app using the express template. When I run vite build, it adds var o2=require("react") in the build file. This makes the app build break when loading the app in shopify in the browser with the error
I need some urgent help in resolving this as we are almost finished with all the requirements for submitting our app for review and it has stopped working all of a sudden. Same app build was working earlier when I built the app for the first time using the same dockerfile.
We’re in the middle of trying a hack to rollback to the last working version of the container image for now. I’ll try the above method after this and get back with the outcome. It does seem to make sense. Thanks for the quick response though, Liam.
The Shopify internal dev teams have investigated this issue and it appears it was related to our i18nFormat plugin for the i18next library. We’ve shipped a fix to the above plugin to resolve this, so to fix this issue developers should update @Shopify_77 /i18next-shopifyto 0.2.9. If anyone is still experiencing this problem after updating please let us know.
Thank you Liam for the solution. After we tried the hack we mentioned earlier, it worked but was not a feasible approach. We updated the version number afterwards for the package you mentioned and it worked like a charm.