Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ async function compileString(
} as Less.Options);

return {
contents: options.sourcemap ? `${css}\n${sourceMapToUrlComment(map)}` : css,
// There can be cases where `less` will return an undefined `map` even
// though the types do not specify this as a possibility.
contents: map ? `${css}\n${sourceMapToUrlComment(map)}` : css,
loader: 'css',
watchFiles: [filename, ...imports],
};
Expand Down