diff --git a/src/helpers/__tests__/fixtures/tsconfig-paths.module.scss b/src/helpers/__tests__/fixtures/tsconfig-paths.module.scss index 0cfe09c..7614442 100644 --- a/src/helpers/__tests__/fixtures/tsconfig-paths.module.scss +++ b/src/helpers/__tests__/fixtures/tsconfig-paths.module.scss @@ -1,2 +1,2 @@ -@import '@scss/_external.module.scss'; +@import '@scss/_external.module'; @import 'alias.scss'; diff --git a/src/helpers/getClasses.ts b/src/helpers/getClasses.ts index 77169c7..f6b598d 100644 --- a/src/helpers/getClasses.ts +++ b/src/helpers/getClasses.ts @@ -78,7 +78,10 @@ export const getClasses = ({ baseUrl && paths ? createMatchPath(path.resolve(baseUrl), paths) : null; const aliasImporter: sass.Importer = (url) => { - const newUrl = matchPath !== null ? matchPath(url) : undefined; + const newUrl = + matchPath !== null + ? matchPath(url, undefined, undefined, ['.scss']) + : undefined; return newUrl ? { file: newUrl } : null; };