Premise
I have a VueJS project that uses service modules that I wrote.
Since I used vue cli I used the handy @
symbol to denote my src folder and easily load all my modules using that pattern:
/* Inside someService.js */
import API from '@/services/APIService.js'
Problem
The problem is that now I am trying to load these modules using nodejs to use the same functionality on the server and avoid duplication of code.
I got around the import
support in node using esm but I get an error for all modules using the @
symbol.
Possible solution
I can go through my entire code base and try and get rid of the @
symbol but that would be my last resort.
Question
How do I load these modules using the @
symbol to denote the src
folder?