-
Notifications
You must be signed in to change notification settings - Fork 94
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
Vite build for production doesn't work #29
Comments
Can you please list down the exact steps you followed before you saw the error? |
Then navigate to vite config and updated to the following per the docs
Then update index.html to include the following:
This WILL build and work Now to break it... in the HellowWorld.vue file I've added the following to make a basic call to load an nft I've added the following:
then...
This will build... however it will NOT display in the browser it shows the following error: Uncaught TypeError: Class extends value undefined is not a constructor or null This is the same error i get with my more customized version of this. I rebuilt this using barebones to demonstrate that the simplest metaplex functionality breaks it in production mode. It DOES work in dev mode. |
Thanks to @KartikSoneji the solution was to add an additional alias:
to the vite.config.js file. |
I have used both the React and Vue examples and neither will build for production when using npm preview. It only happens when the metaplex object is called. There error for both the vue and react examples is:
uncaught TypeError: Class extends value undefined is not a constructor or null
Any help resolving this would be appreciated.
The text was updated successfully, but these errors were encountered: