Vapor Mode Roadmap and Temporary Alternatives #7904
Closed
caseycarroll
started this conversation in
General Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I believe I have a good use case for the recently announced "vapor mode". My organization has two instances of Vue on every page. This is because the main content of a page is a Vue app and in the navigation, two widgets are built with Vue. This decision has led to tech debt; Namely, duplicate vue runtime bundles.
The nav widgets are very simple. A widget for selecting your store location and another for looking at your account info. Unfortunately this comes in at ~315kb JS and ~45kb CSS, uncompressed. While some code refactoring may lead to a smaller footprint, forgoing the VDOM runtime might make the biggest impact. Vapor mode would allow me to reduce the weight of this widget without rewriting the business logic.
Vapor Mode intends to compile Vue code into more performant JS without the VDOM runtime. It seems like Astro does this, too, if I'm not mistaken. I'm wondering if compiling Vue without the VDOM runtime is possible today, or if I should wait for Vapor mode to mature. Are there npm packages out there that achieve something similar?
Alternatively I could make the case for rewriting these widgets in vanilla JS or with web components, but that's a huge undertaking. This code is old and the business requirements are not documented anywhere. Reimplementing it would be a significant risk.
Would love to hear the community's thoughts!
Beta Was this translation helpful? Give feedback.
All reactions