Closed
Description
In my tsconfig.json
I have aliases for specific paths:
{
"compilerOptions": {
"paths": {
"@ui": ["ts/ui"],
"@utils": ["ts/utils"],
"@fonts/*": ["fonts/*"],
"@img/*": ["img/*"],
"@json/*": ["json/*"],
"@scss/*": ["scss/*"]
},
In my WebPack configuration I'm using the same configuration to make Webpack and it's plugins aware of these aliases.
Unfortunately, if I have an @import
on such an alias, the typescript-plugin-css-module
fails to get the class names.
e.g. a styles.module.scss:
@import "@scss/_custom-media.scss";
.dialog {
width: 500px;
}
In that case, it does not resolve the alias for "@scss/_custom-media.scss" and the whole module is empty, instead of containing dialog
.
TypeScript itself is able to resolve "@scss", so I wonder if it's possible using this plugin to use such aliases too.