Fix Sass source maps with absolute paths in sources #5247

Closed
opened 2025-12-29 19:25:51 +01:00 by adam · 0 comments
Owner

Originally created by @thatmattlove on GitHub (Aug 30, 2021).

Originally assigned to: @thatmattlove on GitHub.

Proposed Changes

Figure out how to use a relative path, or disable sourcemaps for Sass files altogether.

See:

Justification

As-is, the absolute path of the source file is included in Sass maps, for example:

{
  "version": 3,
  "sources": ["sass:/Users/ml/dev/netbox/netbox/project-static/styles/_cable_trace.scss"],
  "mappings": "...",
  "names": []
}

JavaScript sourcemaps, on the other hand, contain relative paths. For example:

{
  "version": 3,
  "sources": ["../src/select/api/apiSelect.ts"],
  "mappings": "...",
  "names": []
}
Originally created by @thatmattlove on GitHub (Aug 30, 2021). Originally assigned to: @thatmattlove on GitHub. ### Proposed Changes Figure out how to use a relative path, or disable sourcemaps for Sass files altogether. See: - evanw/esbuild#519 - evanw/esbuild#1290 - glromeo/esbuild-sass-plugin#19 ### Justification As-is, the absolute path of the source file is included in Sass maps, for example: ```json { "version": 3, "sources": ["sass:/Users/ml/dev/netbox/netbox/project-static/styles/_cable_trace.scss"], "mappings": "...", "names": [] } ``` JavaScript sourcemaps, on the other hand, contain relative paths. For example: ```json { "version": 3, "sources": ["../src/select/api/apiSelect.ts"], "mappings": "...", "names": [] } ```
adam added the type: housekeeping label 2025-12-29 19:25:51 +01:00
adam closed this issue 2025-12-29 19:25:52 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5247