Hebilicious/form-actions-nuxt

Apply method-shadowed routes fallbacks in h3

Closed this issue · 4 comments

Describe the feature

The PR mentioned in Nitro Modifications has been closed (unjs/nitro#1286), saying that with recent changes in h3 it should be possible without further configuration. Seems like the PR didn't make it into the upstream though.

I am using the latest nitro(v.2.5.2) and h3(v1.7.1), and can confirm it still does not work without the custom fork version.
Does this mean that this project should work on another implementation to adapt the change in h3/#461 -- whatever that may be?

By the way, I just arrived to vue and nuxt land from sveltekit, and this project seems like the exact missing piece. Thanks for the work! 😎

Additional information

  • Would you be willing to help implement this feature?

Hi @jangxyz , thanks for the support !

I believe the change that you mentioned should be available in h3 1.8 and above, however the last time I tested it it wasn't working, so you'd have to be a little patient.
We're also working on adding method matching directly into the h3 router unjs/rou3#59

If you want native form actions in Nuxt, the best way to support this feature would be to

  • use this package and star this repository
  • upvote / add relevant comment on the related issues nuxt/nuxt#20649 / unjs/rou3#59
  • start discussions in the nuxt discussions/discord/twitter about this feature to make it more popular

Awesome! I guess I'll wait until those ultimately gets applied.

use this package and star this repository

Already done! 😎
I'll keep a close watch on the enhancement proposal as well.
You can close this issue, thanks.

Meanwhile, I've encountered some gotchas, or "help required"s. I'll post them on discussions.

@jangxyz I've just released https://github.com/Hebilicious/form-actions-nuxt/releases/tag/v0.2.0-beta.0, which works with official nitro and h3, fork no longer needed.

There is some (small) breaking changes, check the release notes.

Awesome! Checked all works well :D Thanks!