Skip to content

Commit

Permalink
sourceMapURL matches gen'd filename. Fixes #43.
Browse files Browse the repository at this point in the history
  • Loading branch information
epben committed Jan 17, 2020
1 parent d44fe25 commit 846a085
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

**v1.6.0-v1.6.2** (<small>January 2020</small>)
**v1.6.0-v1.6.3** (<small>January 2020</small>)
=============================================

## What's New
Expand All @@ -9,6 +9,7 @@
## Bug Fixes
- Fix for compiler stalling when less error exists in file other than being saved&mdash;[#55](https://github.com/mrcrowl/vscode-easy-less/issues/55)
- Fix for palette command "Compile LESS to CSS" not triggering in newer versions of VS code.&mdash;[#46](https://github.com/mrcrowl/vscode-easy-less/issues/46)
- Fix for `sourceMapURL` not matching generated file when using `main` and `out` settings together.&mdash;[#43](https://github.com/mrcrowl/vscode-easy-less/issues/43)

**v1.5.0-v1.5.1** (<small>October 2019</small>)
=============================================
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "easy-less",
"displayName": "Easy LESS",
"description": "Auto-compile LESS to CSS on save",
"version": "1.6.2",
"version": "1.6.3",
"publisher": "mrcrowl",
"engines": {
"vscode": "^1.22.0"
Expand Down
3 changes: 2 additions & 1 deletion src/LessCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ export async function compile(lessFile: string, content: string, defaults: Confi
if (!sourceMapOptions.sourceMapFileInline)
{
sourceMapFile = cssFile + '.map';
sourceMapOptions.sourceMapURL = "./" + baseFilename + extension + ".map";
const sourceMapFilename = path.parse(sourceMapFile).base;
sourceMapOptions.sourceMapURL = "./" + sourceMapFilename; // baseFilename + extension + ".map";
}

options.sourceMap = sourceMapOptions;
Expand Down

0 comments on commit 846a085

Please sign in to comment.