wobsoriano / nuxt3-socket.io

Nuxt 3 and Socket.io integration.
59 stars 9 forks source link

fix: use jiti for dev mode imports #4

Closed simllll closed 1 year ago

simllll commented 1 year ago

fixes https://github.com/wobsoriano/nuxt3-socket.io/issues/2

because (non compiled) import from ts files is not possible during runtime wihtout jiti, the issue arises that the file cannot be found. this PR changes the import to an "mjs" which then loads the dependencies through jiti. Therefore it's possible to use typescript again!

Issue was only for dev mode, production mode works fine so far.

opened a topic at nuxt discord: https://discord.com/channels/473401852243869706/1078318315279241316

simllll commented 1 year ago

ping @wobsoriano

wobsoriano commented 1 year ago

ping @wobsoriano

Taking a look in a bit.

wobsoriano commented 1 year ago

Looks good! Love the jiti fix.