Closed payalord closed 4 years ago
This issue as been imported as question since it does not respect express-template issue template. Only bug reports and feature requests stays open to reduce maintainers workload. If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically. Your question is available at https://cmty.app/nuxt/express-template/issues/c122.
you need either tsconfig or webpack config for resolving @ alias to another path
@payalord
@Prozi thanks for trying to help me, we discussed this here in nuxt issues thread. And I provided my solution there.
Starting from file
api/index.js
, where express server begins and nuxt serverMiddleware setup, all import paths with '@' cannot find that path/files to import. Here are the error in console:What I need is for '@' to point to project root dir so i can include my custom js files from there, from any file that will be used in this server middleware including itself. My code of
api/index.js
: