create-nuxt-app icon indicating copy to clipboard operation
create-nuxt-app copied to clipboard

Aliases with Express.js

Open webistomin opened this issue 4 years ago • 2 comments

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...'

webistomin avatar May 20 '20 12:05 webistomin

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!

manniL avatar May 20 '20 12:05 manniL

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 :)

webistomin avatar May 20 '20 13:05 webistomin