https://supertokens.com/ logo
#community
Title
# community
d

denniarems

07/21/2022, 2:59 PM
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

rp

07/21/2022, 3:33 PM
Hey! We have example apps and blogs for this
If you have any specific questions, please feel free to ask.
d

denniarems

07/21/2022, 7:34 PM
i got an error when using this vue template :
pnpm build
https://github.com/antfu/vitesse
r

rp

07/21/2022, 7:35 PM
How r you importing?
d

denniarems

07/21/2022, 8:16 PM
main.ts
its works when in development mode
pnpm dev
but error in build mode
pnpm build
r

rp

07/22/2022, 3:49 AM
Can you open an issue about this on our GitHub?
d

denniarems

07/22/2022, 6:02 AM
Ok
r

rp

07/22/2022, 9:29 AM
thanks for making the issue. @nkshah2 will help out
n

nkshah2

07/22/2022, 11:11 AM
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

denniarems

07/22/2022, 10:03 PM
Let me check and try 😘 thanksss
3 Views