nuxt-community / proxy-module

The one-liner node.js http-proxy middleware solution for Nuxt 2 using http-proxy-middleware
MIT License
413 stars 26 forks source link

Nuxt 3 Support #118

Open harlan-zw opened 1 year ago

harlan-zw commented 1 year ago

Hey :wave: It looks like this module hasn't been updated for Nuxt 3. In an effort to improve the developer experience of modules, I've updated the module to clarify that it only supports Nuxt 2.

If Nuxt 3 support is added it will be moved to the https://github.com/nuxt-modules organisation.

Alternatives:

export default defineNuxtConfig({
  routeRules: {
    '/proxy/example': { proxy: 'https://example.com' },
    '/proxy/**': { proxy: '/api/**' },
  }
})

@ricardogobbosouza With Nitro supporting proxying natively, do you think it's worth deprecating this module?

Please let us know and thanks for your work!

ricardogobbosouza commented 1 year ago

@harlan-zw I believe that deprecating this module is the best option. Whenever possible, use native nuxt3 resources. What would @danielroe recommend?

harlan-zw commented 1 year ago

Worth noting we don't need to deprecate it, instead we can just state that it won't be upgraded to Nuxt 3*

pi0 commented 1 year ago

Yes, it should be deprecated fully or mentioned Nuxt 3 has replacement.

Nitro provides both dev time and build time proxy capabilities which completely replaces functionality of this module.

If we want to consider longer term Nuxt 2 maintenance, might as well move to nitro-bridge or migrate to unjs/httpxy which is at least actively maintained.