cardano-serialization-lib
cardano-serialization-lib copied to clipboard
Vue3 + Vite fails to import
Hello, I am trying to get this lib import for Vite
import init, { wasm } from '@emurgo/cardano-serialization-lib-browser/cardano_serialization_lib';
But i was facing the error as follows:
Does anyone have idea how to import the lib for Vite & Vue3?
Did you find any solution for this?
@emurgo/cardano-serialization-lib-browser this doesn't work with vite?
I worked with this for awhile and was never able to get it to work correctly the way the Vite docs say it should. I think there's something different about the way the project is set up and the newer method for loading the WASM that vite is calling. IDK anyways there is a non-wasm js package that you can use with Vite if you're willing to give up on the WASM for now, alternatively it does work with webpack and I've done that successfully with Vue.
It should help https://www.npmjs.com/package/vite-plugin-wasm