Replace vite-plugin-node-polyfills with @rolldown/plugin-node-polyfills#1095
Closed
Replace vite-plugin-node-polyfills with @rolldown/plugin-node-polyfills#1095
Conversation
Co-authored-by: Rhilip <13842140+Rhilip@users.noreply.github.com>
…lldown/plugin-node-polyfills Co-authored-by: Rhilip <13842140+Rhilip@users.noreply.github.com> Agent-Logs-Url: https://github.com/pt-plugins/PT-depiler/sessions/e5acfe09-432c-464b-a455-c319af6498d4
…polyfills Co-authored-by: Rhilip <13842140+Rhilip@users.noreply.github.com> Agent-Logs-Url: https://github.com/pt-plugins/PT-depiler/sessions/e5acfe09-432c-464b-a455-c319af6498d4
Copilot
AI
changed the title
chore: update Vite to v8
Replace vite-plugin-node-polyfills with @rolldown/plugin-node-polyfills
Mar 25, 2026
Collaborator
|
choked |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vite-plugin-node-polyfillsis incompatible with Vite 8's Rolldown bundler. This switches to@rolldown/plugin-node-polyfills, the official Rolldown replacement.Changes
package.json: Removevite-plugin-node-polyfills;@rolldown/plugin-node-polyfillswas already added in the Vite 8 upgrade PRvite.config.ts:@rolldown/plugin-node-polyfillsenforce: "pre"— without it,vite:resolve/oxcResolvePluginexternalizes Node built-ins (buffer,path) before the polyfill'sresolveIdhook can intercept them, since Vite places its internal resolver betweenprePluginsandnormalPluginsscriptViteConfigandhtmlViteConfiginsidewebExtension()— that plugin spawns separate Vite 6 sub-builds using its own bundled Vite instance, which don't inherit top-level pluginsThe
options.transform.injectreturned by the plugin is Rolldown-specific and produces a harmlessUnknown input options: transformwarning in the Vite 6 Rollup sub-builds, but correctly injectsBuffer/process/globalshims in the main Vite 8/Rolldown build.📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.