webpack sass-loader not using tsconfig path

Viewed 149

Sass-loader seem to not use path (alias) declared in the typescript configuration. So a simple @use or @import give a not found error.

Webpack

resolve: {
    plugins: [new TsconfigPathsPlugin()],

tsconfig

"paths": {
    "Components/*": ["src/components/*"],

The result

SassError: SassError: Can't find stylesheet to import.
1 │ @use 'Components/UI/Grid';

Is it possible to import the tsconfig path in the sass-loader ?

0 Answers
Related