Replies: 3 comments 2 replies
-
@wattanx Any suggestions? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Do you mean nuxt 2 and nuxt 3 coexist? |
Beta Was this translation helpful? Give feedback.
2 replies
-
I think it is better to use load balancer or cloudfront behaviour to distribute the routes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been trying to upgrade Nuxt 2 projects to Nuxt 3 for the past two months, but the actual situation is not optimistic. There are many third-party dependencies and other issues to deal with.
In addition, the support of the bridge is very limited. In fact, I have a particularly bold idea!
Since Nuxt 3 & 4 support multiple pages app, why don’t we try to make the bridge support this mode? Let the routes be mixed together.
The root nuxt app is the latest Nuxt 3, and the sub pages app is Nuxt 2 + bridge. In this way, we can upgrade gradually without having to change dozens of files to upgrade a feature.
The most important thing is that we can directly use Vue 3 + Nuxt 3 & 4 when writing new pages, and for old pages, we still keep the Nuxt 2 method.
In terms of compilation, I think it is compiled into two different products. Enter different routes to load Vue 2 or Vue3.
In the two months I have been using the bridge, I feel more and more that we need a similar upgrade path. In this way, we don’t have to consider whether the old project needs to modify the API, so that we have enough time to refactor the page for upgrading.
The bridge approach is difficult to use now. For example, if meta: true is enabled and the head of the option API is not fully migrated to useHead, all SEO & Meta will become invalid during SSR. There are many similar differences.
Nuxt 2 legacy users are almost all using it in the formal production environment. Each feature upgrade means that hundreds of files and thousands of codes need to be modified.
Therefore, I think using sub pages app, compiling it into two apps. Then relying on nitro to load different apps on different paths can speed up our upgrades. And it is not easy to have problems.
Beta Was this translation helpful? Give feedback.
All reactions