davidmyersdev / vite-plugin-node-polyfills

A Vite plugin to polyfill Node's Core Modules for browser environments.
MIT License
301 stars 22 forks source link

Support Vite 5 #55

Closed bdbvb closed 10 months ago

bdbvb commented 10 months ago

Add support for Vite 5.

Current configuration:

"peerDependencies": {
    "vite": "^2.0.0 || ^3.0.0 || ^4.0.0"
},

In the meantime, for a temporary workaround (in your own package.json):

"overrides": {
    "vite": "5.0.0"
}
acuD1 commented 10 months ago

Hi, I'm new to the npm ecosystem, but wouldn't it be more accurate to write :

  "overrides": {
    "vite-plugin-node-polyfills": {
      "vite": "^5.0.1"
    }
  }

@bdbvb

daiky00 commented 10 months ago

@maxnowack when do you think you can get this merge? I really need this package for Vite 5

maxnowack commented 10 months ago

Hey @daiky00, I mentioned this issue from another repository. The PR on SignalDB doesn't fix this issue, but is also just waiting for a fix, since it's blocking the PR from which I mentioned it. It's just a reference.

Fixing this issue should be done by the maintainer of vite-plugin-node-polyfills @davidmyersdev

TomPlum commented 10 months ago

I was gonna raise a PR but I'm getting issues with PNPM when setting up locally. Unsure if its an issue with my local environment. Bumping vite causes a couple of other deps to need to be bumped too. One of them also has the same peer-dependency issue downstream. Build and tests are failing after that though so probably needs someone more experienced with this stuff to have a look.

The override works for now if I bump other vite plugins.

maxnowack commented 10 months ago

@TomPlum it seems that is was only on your environment. Installation, building and also the tests are working/passing on my side. I just opened #57 that adds vite v5 to the peer dependencies

TomPlum commented 10 months ago

Thanks @maxnowack - I'll have a look at sorting my local 👍🏻

daiky00 commented 10 months ago

Hey @davidmyersdev, can you review this and get this merge? I really need the polyfills since I am migrating from Webpack to Vite 5.

davidmyersdev commented 10 months ago

This was released in v0.17.0.