As concluded in T249725, Vue.js v2 will be used for search. The project could either:
- Depend on the Vue.js compiler + runtime ResourceLoader module currently available in Core.
- Depend on a new Vue.js runtime-only ResourceLoader module in Core.
- Build the Vue.js runtime into the components entry.
- Expose a new Vue.js runtime-only ResourceLoader module in Vector.
- Something else.
According to the documentation, shipping the Vue.js runtime without the compiler is about 30% lighter. There is also a CPU performance savings for every pageview that scales with the number of components shipped. Since the pilot project is risky by nature and user interactivity makes it especially timing sensitive, minimizing the payload as much as possible is preferable and the obvious choice seems to be #2.
That is, expose a new Vue.js v2 runtime-only ResourceLoader module in Core with no other dependencies.
Note: WMDE's Vue templates are pre-compiled so they may wish to leverage the new dependency as well.
New acceptance criteria
- A new search only ResourceLoader module is added to Vector. Initially, this will only contain the Vue.js minified, production runtime. Eventually, it will contain WVUI and any new search experience code needed.
- T251974 is revised to document migration requirements for Vector.
Old acceptance criteria
- The Vue.js minified, production runtime is exposed as a ResourceLoader module with no other dependencies.
- The Vue.js minified, production compiler module actually depends on the runtime ResourceLoader module so that 1) it never needs to be loaded twice 2) it must be kept in sync with the runtime.
- The Vue.js development runtime is exposed as a ResourceLoader module. It is probably ok if this shares the same module as the development compiler + runtime.
- Naming and versioning is considered. I'm guessing whatever Roan decides is fine but WMDE contacts are CC'd on this ticket. It would be neat if the names corresponded to the official distributables.