This (currently placeholder) spike seeks to shed light on how to better share dependencies across projects both in the near- and long-term as is practical.
Some initial considerations:
- If Webpack is used, do we want or //need// to split the runtime out for sharing? If two projects are using Webpack (e.g., [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Popups/+/deaaf0961b7ae8d28ef94023e04db1fb93a7724d/webpack.config.js | Popups ]]), are there any conflicts to be aware of? Do we need any test infrastructure for ensuring versions match? (E.g., if Popups and Vector are installed, `require` the `package.json` files of both and check that the major and minor versions match.)
- How can we depend on Vue? Are there any concerns on simply using the Core ResourceLoader module (comes in both dev and prod flavors)?
- Do we anticipate other libraries will be needed in the runtime? Do all of these get pushed into Core? The only //unusual// dependency I see in Popups and MobileFrontend are redux* and Vuex probably won't be needed for search.
- How should we load Vue.js? E.g., as a RL module dependency in `skin.json` or [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Popups/+/deaaf0961b7ae8d28ef94023e04db1fb93a7724d/resources/ext.popups/index.js#1 | defer loading until after initial render ]]? On input? Something else?
- If two projects have the same dependencies, how are those shared in the context of ResourceLoader?
== Acceptance criteria
- [] [[ https://www.mediawiki.org/wiki/Vue.js | Define versioning communication guidelines on wiki ]] for updating shared dependency. Initial understanding from @Volker_E, is that OOUI announces version breaking changes but clients are expected to update their own code.