Skip to content

Commit 888be88

Browse files
support goToDefinition also for less
1 parent 56514cc commit 888be88

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/helpers/getCssExports.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export const getCssExports = ({
7676
syncImport: true,
7777
filename: fileName,
7878
paths: [directory],
79+
sourceMap: true,
7980
...(rendererOptions.less ?? {}),
8081
} as Less.Options,
8182
(error?: Less.RenderError, output?: Less.RenderOutput) => {
@@ -85,6 +86,9 @@ export const getCssExports = ({
8586
if (output === undefined) {
8687
throw new Error('No Less output.');
8788
}
89+
90+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
91+
sourceMap = JSON.parse(output.map ?? "undefined") as RawSourceMap | undefined;
8892
transformedCss = output.css.toString();
8993
},
9094
);

0 commit comments

Comments
 (0)