You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am guessing that sourceRoot is added to them, and because bundles are located in /www/assets, but the script is executed in project root, it results in ../../ being added. In this case this behavior is not needed, so I am wondering how could I avoid it?
If Scala.js project uses some node_modules, then source map entries do get correctly resolved as, for example, "../../node_modules/lodash/lodash.js", but everything else does not work.
The text was updated successfully, but these errors were encountered:
ptrdom
changed the title
Source map root appended to sources that do not need it
Source map root added to sources that do not need it
Jun 21, 2023
I'm creating a plugin, compile scss using sass library.
sass create sourcemaps with "file:///absolute/path" in "sources" field, and esbuild turn them into "../src/file:/absolute/path", this is strange.
If I remove "file://", they becomes "../src/absolute/path", still not usable.
The most important thing is, I have no way to guess relative path of a source map when there are multiple output file, I can't know "who import me" in onLoad stage.
I am working on integrating esbuild as a bundler for Scala.js projects (https://github.com/ptrdom/scalajs-esbuild) and I am running into an issue I do not understand.
Scala.js compilation outputs source maps for
.js
files with entries like these:After bundling with esbuild these become:
I am guessing that
sourceRoot
is added to them, and because bundles are located in/www/assets
, but the script is executed in project root, it results in../../
being added. In this case this behavior is not needed, so I am wondering how could I avoid it?If Scala.js project uses some node_modules, then source map entries do get correctly resolved as, for example,
"../../node_modules/lodash/lodash.js"
, but everything else does not work.The text was updated successfully, but these errors were encountered: