-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Blazor] Remove sourcemap link comments from production bundles for blazor.web.js and blazor.webassembly.js #62558
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
Conversation
…nd blazor.webassembly.js Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
src/Components/Web.JS/package.json
Outdated
| "@babel/preset-env": "^7.23.6", | ||
| "@babel/preset-typescript": "^7.23.3", | ||
| "@microsoft/dotnet-js-interop": "*", | ||
| "@microsoft/dotnet-js-interop": "^10.0.0-dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not change this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted the unintended change to the @microsoft/dotnet-js-interop dependency. The package.json now maintains the original "*" version. The main fix for the sourcemap issue remains in rollup.config.mjs only.
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
lewing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the remaining package-lock change intended?
package-lock.json
Outdated
| "@babel/preset-env": "^7.23.6", | ||
| "@babel/preset-typescript": "^7.23.3", | ||
| "@microsoft/dotnet-js-interop": "*", | ||
| "@microsoft/dotnet-js-interop": "^10.0.0-dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo this change too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted the package-lock.json changes in commit 6d9e1e4.
javiercn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot get back to work!
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
No, the package-lock.json change was unintended. I've reverted it in commit 6d9e1e4. |
This change modifies the Rollup configuration to generate sourcemap files without including sourcemap link comments in production bundles for
blazor.web.jsandblazor.webassembly.js.Changes Made
src/Components/Web.JS/rollup.config.mjsto usesourcemap: 'hidden'for production builds of blazor.web.js and blazor.webassembly.js.mapfiles but omits the//# sourceMappingURL=comments from the bundleblazor.server.jsstill gets sourcemap link comments (sourcemap: true)blazor.webview.jsstill gets inline sourcemaps (sourcemap: 'inline')Behavior
Before:
After:
The sourcemap files (
blazor.web.js.map,blazor.webassembly.js.map) are still generated and contain full debugging information. Developers can manually load these sourcemaps in browser dev tools when needed.Benefits
Fixes #62295.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
googlechromelabs.github.ionode install.mjs(dns block)https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.35/linux64/chrome-headless-shell-linux64.zipnode install.mjs(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.