Skip to content

Conversation

jlas
Copy link
Contributor

@jlas jlas commented Jul 27, 2024

I started using vite-plugin-node-polyfills on a fairly large vite project and it made vite build slower by 50-100%. It also caused increased memory usage (causing OOM errors).

I tracked down the source of the slowdown to the inject plugin. My config had globals.{Buffer, global, process} all set to false so the plugin was not necessary.

I reworked the logic to avoid passing in the inject plugin when there are no shims to inject.

@davidmyersdev davidmyersdev force-pushed the jlas/avoid-empty-inject branch from bf0096b to 5362dcc Compare January 19, 2025 01:03
@davidmyersdev davidmyersdev force-pushed the jlas/avoid-empty-inject branch from 5362dcc to e462084 Compare January 19, 2025 01:10
@davidmyersdev davidmyersdev merged commit 5f36379 into davidmyersdev:main Jan 19, 2025
4 checks passed
@davidmyersdev
Copy link
Owner

Released in v0.23.0.

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