diff --git a/src/transformers/less.ts b/src/transformers/less.ts index 7a7289a2..508e1006 100644 --- a/src/transformers/less.ts +++ b/src/transformers/less.ts @@ -1,3 +1,5 @@ +import { isAbsolute, join } from 'path'; + import less from 'less'; import { getIncludePaths } from '../modules/utils'; @@ -20,10 +22,14 @@ const transformer: Transformer = async ({ ...options, }); + const dependencies = imports.map((path: string) => + isAbsolute(path) ? path : join(process.cwd(), path), + ); + return { code: css, map, - dependencies: imports, + dependencies, }; };