Introduce VUE_VERSION env variable for testing @vue/compat

What does this MR do and why?

This MR adds support for VUE_VERSION variable in webpack and jest

Following behavior is expected:

  • default behavior (no VUE_VERSION) should be unchanged
  • VUE_VERSION=2 should use Vue.js 2 + gitlab-ui from source. This is just for debugging purposes to detect issues with setting up our webpack/jest infrastructure and has no value besides that
  • VUE_VERSION=3 uses Vue.js 3 + gitlab-ui from source (mostly for debuggin purposes)

How to set up and validate locally

  • 🚀 yarn webpack should pass
  • 🚀 VUE_VERSION=2 yarn webpack should pass
  • VUE_VERSION=3 yarn webpack should fail complaining only about Vue template compilations (this is intended because Vue.js 3 has differences in templates and will be addressed in next MRs)
  • 🚀 yarn jest should pass
  • 🚀 VUE_VERSION=2 yarn jest should pass
  • VUE_VERSION=3 yarn jest should run, failing here & there, but not about jest misconfiguration

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Illya Klymov

Merge request reports

Loading