Skip to content

fix: Restore kernel-browser-runtime sourcemaps in extension - #575

Merged
rekmarks merged 2 commits into
mainfrom
rekm/fix-extension-sourcemaps
Jul 9, 2025
Merged

fix: Restore kernel-browser-runtime sourcemaps in extension#575
rekmarks merged 2 commits into
mainfrom
rekm/fix-extension-sourcemaps

Conversation

@rekmarks

@rekmarks rekmarks commented Jul 8, 2025

Copy link
Copy Markdown
Member

When we introduced the kernel-browser-runtime package, we effectively broke debugging the kernel by breaking its sourcemaps. This happened because we copied its build output (also from Vite) using vite-plugin-static-copy. To fix this, this PR modifies the extension vite.config.ts to build kernel-browser-runtime directly.

A bigger mystery is why Vite doesn't pull in the sourcemaps of bundled dependencies that ship them. The symptom of this is that we see transpiled .js and .mjs files in the debugger rather than original sources. However, this is still a significant improvement over the status quo, and we can address the larger sourcemap problem later.

@rekmarks
rekmarks force-pushed the rekm/fix-extension-sourcemaps branch from 519b11e to 2e4e4ea Compare July 8, 2025 22:50
@rekmarks
rekmarks marked this pull request as ready for review July 8, 2025 23:14
@rekmarks
rekmarks requested a review from a team as a code owner July 8, 2025 23:14
@rekmarks
rekmarks requested a review from FUDCo July 8, 2025 23:15
@rekmarks

rekmarks commented Jul 8, 2025

Copy link
Copy Markdown
Member Author

@FUDCo you should try out this branch and see if it restores debuggability.

@rekmarks
rekmarks enabled auto-merge (squash) July 8, 2025 23:43

@FUDCo FUDCo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mo betterer.

@rekmarks
rekmarks merged commit 8f9f0c6 into main Jul 9, 2025
22 checks passed
@rekmarks
rekmarks deleted the rekm/fix-extension-sourcemaps branch July 9, 2025 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants