i'm using graphql in vue 3 using villus library , ...
# community
d
i'm using graphql in vue 3 using villus library , can you guys guide me through integration of supertokens in it https://villus.logaretm.com/guide/setup
r
Hey! We have example apps and blogs for this
If you have any specific questions, please feel free to ask.
d
i got an error when using this vue template :
pnpm build
https://github.com/antfu/vitesse
r
How r you importing?
d
main.ts
its works when in development mode
pnpm dev
but error in build mode
pnpm build
r
Can you open an issue about this on our GitHub?
d
Ok
r
thanks for making the issue. @nkshah2 will help out
n
Hey @denniarems Looks like one of the plugins in that template tries to load packages differently when running in production mode. I can see some issues complaining about something similar for
vite-ssg
so this is not a bug on the package side for sure. The main issue is that in production builds the import
Copy code
import ThirdPartyEmailPassword from "supertokens-web-js/recipe/thirdpartyemailpassword";
Gets converted to
Copy code
import ThirdPartyEmailPassword from "supertokens-web-js/recipe/thirdpartyemailpassword.js";
Which is not a valid import statement because that file doesnt exist
As a workaround you can import from the index file directly
Copy code
import ThirdPartyEmailPassword from "supertokens-web-js/recipe/thirdpartyemailpassword/index";
Which works in both production and dev mode
d
Let me check and try 😘 thanksss
3 Views