-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add external source maps to js.Build #8132
Comments
What do you mean by this? What's a "symbol file"? |
OK, I assume you mean "source maps". Yes, I reverted the |
Perfect. That's what I needed. Yes. I will recover the "external" source map support from my PR and the output of ESBuild error messages (currently it seems to only show the main error and no context information to find it unless this was fixed after 79.1) Thanks for the info I will make the PR associated with this issue number. |
In order to support es5 targets we might need to support sourceMaps for babel as well and use babel inside of the esbuild pipeline. |
WIP Added rollup for testing. Added sourceMaps option for babel. Babel can also read sourcemaps from the output of an esbuild if they are "inline", it will then convert the file and remap the source maps and then re-export them but currently not if they are "external". Added support for sourcemap = "external" for esbuild. Ref gohugoio#8132
There is a little bit of a rabbit hole here.
I have a WIP commit that's mostly working, but I needed to test it on a netlify build. With previous versions I just committed a binary hugo into the repo and then used it to build, but with this particular hugo version I get a ./build.sh: line 65: /opt/build/repo/platform-themes/local-hugo/hugo: No such file or directory It maybe related to the version of go I am using on my build system vs the netlify container. Is there a "standard" way to create universal test binaries? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The current symbol resolver seems to work very well and I have not seen any problems using jsconfig files anymore in the last version. So I think things are working very well, but there are two areas I had fixed in my PR which I would love to create a new PR for. These are external map files and better error reporting.
I was trying to extract these from my jsconfig/tsconfig PR, but I think a lot of things have changed around it. I will put together a new PR for it, but I don't quite understand how a file and it's symbol file is piped through the fingerprint pipeline. I know that this happens properly in sass for example, but I couldn't quite figure out where to look for the code. Also the error reporting of JS doesn't seem to output all of the error information returned from esbuild and will just output the error token without any line or file context. It also skips some kind of import stack to be able to find and repair the error.
The text was updated successfully, but these errors were encountered: