Open waxlamp opened 4 years ago
how have you configured your editor, that it still is able to resolve these files? In my case (Visual Studio Code) without any jsconfig.json
or tsconfig.json
having a path mapping, it is not able to do that.
@sgratzl what's in your jsconfig
? I tried adding one and I still couldn't get these aliases to work.
Here's mine:
{
"compilerOptions": {
"allowSyntheticDefaultImports": false,
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"]
}
I use vim, so I don't rely on this editor feature at all (I get the functionality by using plugins like CtrlP).
I am really surprised the modern editors don't handle this, so if that's truly the case, I'll stop tilting at windmills. If someone can definitively determine that this won't work, I'll mark this wontfix
and close it.
I'm in favor of this change from a style perspective. I agree with your motivation. I just want editor support before we make it.
modern editors don't handle this
they do with the proper config. e.g. https://github.com/ImageMarkup/isic-challenge-lineup/ tyepscript + vue + mix of absolute and relative imports
For a given file, when importing a file that isn't "bundled" with it, prefer to use an import like
rather than