Skip to content

perf: only bundle node version debug#19715

Merged
patak-cat merged 1 commit intovitejs:mainfrom
sapphi-red:perf/only-bundle-debug-for-node
Mar 31, 2025
Merged

perf: only bundle node version debug#19715
patak-cat merged 1 commit intovitejs:mainfrom
sapphi-red:perf/only-bundle-debug-for-node

Conversation

@sapphi-red
Copy link
Copy Markdown
Member

Description

debug contains code for both browsers and node. The default entrypoint detects the runtime and uses the corresponding file.
In our case, we know that we only run on node, and the browser code is not needed.

I set alias to debug to resolve to the file that will be used for node.

This PR reduces the compressed package size for 6kB. Not big, but I think the change is simple enough.

@sapphi-red sapphi-red added the p2-nice-to-have Not breaking anything but nice to have (priority) label Mar 25, 2025
@sapphi-red sapphi-red changed the title perf: only bundle debug for node perf: only bundle node version debug Mar 25, 2025
@patak-cat patak-cat merged commit e435aae into vitejs:main Mar 31, 2025
17 checks passed
@sapphi-red sapphi-red deleted the perf/only-bundle-debug-for-node branch March 31, 2025 07:46
moonlitusun pushed a commit to moonlitusun/vite that referenced this pull request May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2-nice-to-have Not breaking anything but nice to have (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants