Retire config.vite.__safe_enabled and config.vite.__set_vue_version
The following discussions from !4068 (merged) should be addressed:
-
@toon started a discussion: Technically we could get rid of this and move the logic of this config setting to here. The only other thing that needs to change is calling
service(:Vite).enabled?insupport/templates/gitlab/config/vite.gdk.json.erb. But I'm happy to postpone that to a future MR. -
@toon started a discussion: I also like to retire
config.vite.__set_vue_versionat some point.
Implementation plan
We’re looking to remove two boolean settings from lib/gdk/config.rb following Populate Vite Procfile entry from service (!4068 - merged) being merged.
-
vite.__set_vue_version, which checks thatvite.vue_versionis equal to3. We want to just check this directly in theenvmethod oflib/gdk/services/vite.rb. -
vite.__safe_enabled, which checks that Vite and Webpack are not enabled at the same time. We want to also move this to theenabled?method oflib/gdk/services/vite.rb.
To do this, for each setting:
- Remove the
bool(:...)setting fromlib/gdk/config.rbin thesettings :vitesection. - For
__safe_enabled, remove the__safe_enabledtest fromspec/lib/gdk/config_spec.rbin thedescribe 'vite'section. - In
support/templates/gitlab/config/vite.gdk.json.erb, replaceconfig.vite.__safe_enabled?withservice(:Vite).enabled?. (That is the method you just updated!)
To test that it all still works, enable Vite by running gdk config set vite.enabled true and disable Webpack gdk config set webpack.enabled true. Then run gdk reconfigure and start the GDK with gdk start and open it in the browser.