mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6131] [MERGED] chore(build): stop shipping production sourcemaps inside the binary #6094
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6094
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6131
Author: @PathGao
Created: 7/29/2026
Status: ✅ Merged
Merged: 7/29/2026
Merged by: @MHSanaei
Base:
main← Head:chore-strip-prod-sourcemaps📝 Commits (2)
12187a8chore(build): stop shipping production sourcemaps inside the binary7a70e65chore(build): gate production sourcemaps behind XUI_SOURCEMAP📊 Changes
1 file changed (+7 additions, -1 deletions)
View changed files
📝
frontend/vite.config.js(+7 -1)📄 Description
Summary
Disable
build.sourcemapfor the production Vite build. Everything ininternal/web/distis embedded into the Go binary viaembed.FS, so the 112.mapfiles (18MB, 72% of dist) currently ship inside every release download.Why
Nothing consumes the maps in production: the served pages never reference them and no error-reporting pipeline reads them.
npm run devserves its own sourcemaps regardless of this build flag, so developer experience is unchanged. Anyone needing to debug a production bundle can flip the flag locally — the config comment says so.Measured:
internal/web/dist25MB → 6.7MB, which comes straight off the embedded payload of every release binary and every panel download/update.Type of change
Areas affected
How was this tested?
npm run build→ zero.mapfiles in dist, panel serves and loads normally from the rebuilt embed.Screenshots / recordings
N/A.
Breaking changes
None.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.