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 revised and extended the esbuild integration in hugo with code splitting (yes, I know about the ordering issue(s)), and had some issues getting source maps working correctly across platforms.
Note that using the Go API it was fairly simple to rewrite the source maps sources field, so this isn't a blocker for me, but I thought I make an issue jotting down my experiences.
Filenames on form /foo/bar.js or c:\\foo\\bar.js in sources works great in Chrome on MacOs, but fails on Windows. Converting it into a URL (file:) makes it work for both.
The text was updated successfully, but these errors were encountered:
The underlying root cause is esbuild treating these strings as file system paths instead of as URLs. However, changing this will break tools that operate on esbuild's output and that expect file system paths, so I'll need to fix these in a breaking change release.
I revised and extended the esbuild integration in hugo with code splitting (yes, I know about the ordering issue(s)), and had some issues getting source maps working correctly across platforms.
Note that using the Go API it was fairly simple to rewrite the source maps
sources
field, so this isn't a blocker for me, but I thought I make an issue jotting down my experiences.Two issues:
sources
filenames correct was to use theoutDir
setting and then dofilepath.Join(outdir, pathFromSources)
. Also see this comment: Source map sources relative to temporary output path #2218 (comment)/foo/bar.js
orc:\\foo\\bar.js
insources
works great in Chrome on MacOs, but fails on Windows. Converting it into a URL (file:
) makes it work for both.The text was updated successfully, but these errors were encountered: