Skip to content

Add support for Vite 5 #103

Closed
Closed

Description

@metalmarker

Thanks for writing this awesome plugin.

Given that deps were not updated yet to support Vite 5, we're seeing a warning: unmet peer vite@^4.0.0: found 5.0.3.

Activity

  1. vcardins commented on Dec 13, 2023

    @vcardins

    Any updates on this?

  2. DavidTsGit commented on Feb 29, 2024

    @DavidTsGit

    Hi. I've got this issue too. Any chance of this being resolved? Thanks!

  3. nlwillia commented on Mar 1, 2024

    @nlwillia

    My impression is that plugins like this might be less relevant (or at least much simplified) once the new runtime API stabilizes. It directly addresses the module-graph/HMR stuff by moving what vite-node was doing into the core.

  4. ZeldOcarina commented on Aug 22, 2024

    @ZeldOcarina

    Any news on this one?

  5. palfaro91 commented on Sep 13, 2024

    @palfaro91

    Will Vite v5 be supported?

  6. dirkluijk commented on Sep 20, 2024

    @dirkluijk

    It seems that adding support for Vite 5 is quite easy, I just submitted a pull request: #112

    @axe-me Is this project still maintained? Could you have a look?

  7. axe-me commented on Sep 22, 2024

    @axe-me
    Owner

    Hi guys, work's crazy busy for me recently again. I will find some time tmr to look into vite5 support. I know vite 5 has some breaking changes and removed some deprecated features this plugin uses. I will see what I can do to make this plugin supports vite5 and backward compatible at the same time.

  8. ZeldOcarina commented on Sep 22, 2024

    @ZeldOcarina

    You are amazing!! Actually this plugin is the only way I found to make Node work with Vite so thank you so much!!!

  9. dirkluijk commented on Sep 22, 2024

    @dirkluijk

    @axe-me No worries! Many thanks. The plugin is amazing indeed. Let me know if I can help you with anything.

    As far as I could see, I was able to use the plugin with Vite 5 after upgrading its dependencies. So maybe we could even support Vite 4 and 5 simultaneously.

    Alternatively, we could release a major version and include a compatibility matrix in the README.md. :)

  10. eugeniosegala commented on Oct 3, 2024

    @eugeniosegala

    Would it be possible to review and merge @dirkluijk's PR? 🙏

    #112

  11. dirkluijk commented on Oct 7, 2024

    @dirkluijk

    Since I am depending on this plugin for an enterprise project, I am also willing to fork this project and taking a bit of ownership in its development in another open-source fork. Considering this project is MIT licensed, that seems appropriate. @axe-me what's your thought on this?

    However, I'd consider dropping swc support then, to make the forked project simpler. What is the business case to use swc as compiler instead of esbuild?

    Update: never mind, I see it's mainly because of NestJS, which doesn't have proper support for esbuild yet.

  12. dirkluijk commented on Oct 8, 2024

    @dirkluijk

    Eventually, I ended up adopting part of the source code for my own plugin, without the SWC compiler and only supporting Express. The code is actually very straightforward, if anyone is interested, here is a gist:

    https://gist.github.com/dirkluijk/e1a57bd09a13ee55695907e81c7123a2

  13. axe-me commented on Oct 9, 2024

    @axe-me
    Owner

    Hi guys, I just released a new version, 4.0.0, which supports vite 5. Most simple test cases are passed. However, there are some commonjs issues when I try to use it in my large project (because the buildSsrCjsExternalHeuristics option is removed in vite5). I will try to figure out a solution for that, but in the meantime please test out the version, and let me know if you find more issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions