WebCompiler icon indicating copy to clipboard operation
WebCompiler copied to clipboard

Sourcemap in css has an absolute path

Open MatteoPiovanelli opened this issue 2 years ago • 1 comments

Installed product versions

  • Visual Studio: 2022 Professional
  • This extension: 1.14.10

Description

When generating a css file from a scss, the inline sourcemap has a reference to the absolute path of the scss on the development machine.

Steps to recreate

  1. Replace this
  2. text with
  3. the steps
  4. to recreate

Current behavior

When generating a css file from a scss, the inline sourcemap has a reference to the absolute path of the scss on the development machine. This is wrong because:

  • It exposes the folder structure of the development machine.
  • If I commit the artifacts (the css files) to version control, compiling the same scss on different machines results in different css.
  • The path is wrong when the css artifact is deployed.

Expected behavior

I suppose the path to the source map should be relative from the artifact's location.

MatteoPiovanelli avatar Jun 15 '23 09:06 MatteoPiovanelli

This is an issue with Dart-Sass…

https://github.com/sass/dart-sass/pull/1021

failwyn avatar Jun 20 '23 03:06 failwyn