Skip to content
Discussion options

You must be logged in to vote

Hi.

Did you make a mistake while writing the discussion, or actually followed these steps? You said you installed rollup-plugin-polyfill-node but tried to use @rolldown/plugin-node-polyfills. You should run npm install --save-dev @rolldown/plugin-node-polyfills instead.

Also, as you can see in its name, it's a Rolldown plugin, not a Vite plugin. So, the way you are using it won't work. You can try:

extendViteConf: () => ({
  build: {
    rolldownOptions: {
      plugins: [nodePolyfills()]
    }
  }
})

But, there is a chance that it won't work. In that case, you might want to wait a bit until the vite plugin properly supports Vite 8
davidmyersdev/vite-plugin-node-polyfills#150
davidmyersde…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rtcpw
Comment options

Answer selected by rtcpw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants