nuxt / create-nuxt-app

Create Nuxt.js App in seconds.
MIT License
3.47k stars 428 forks source link

Aliases with Express.js #532

Open webistomin opened 4 years ago

webistomin commented 4 years ago

Hi!✌ I am using Nuxt.js with Express.js.

How to properly use "@" or "~" aliases inside server folder? It doesn't work for me.

Error: Cannot find module '~/server...'

manniL commented 4 years ago

This won't work. Even when you do it the other way around, using Express inside Nuxt via serverMiddleware, aliases won't work (slightly related).

PS: I suggest to avoid using Nuxt.js as Express middleware!

webistomin commented 4 years ago

This won't work. Even when you do it the other way around, using Express inside Nuxt via serverMiddleware, aliases won't work (slightly related).

PS: I suggest to avoid using Nuxt.js as Express middleware!

Thanks :)