How to configure "~" alias when working with Docker?

Currently I have not set
"alias"
(thus using the defaults) in
nuxt.config.js
.
I use paths like
import { formatDate } from '~/shared/datetime.mjs';
import { fsw as nl } from '~/lang/nl.mjs';
import { fsw as en } from '~/lang/en.mjs';


This works fine when running dev server or building (which we do inside Docker).
VSCode on the other hand (working in the host) does not like this (see attachment).

The cause of the problem is that inside Docker the base path is at
/var/app
while on the host this is mapped to
/user/me/projects/myproject
.
Is there a way to get aliasses to work both inside and outside Docker?
image.png
Was this page helpful?