Retire config.vite.__safe_enabled and config.vite.__set_vue_version
requested to merge gitlab-community/gitlab-development-kit:2237-retire-vite-safe-enabled-and-set-vue-version into main
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you can request access to GitLab Duo.
What does this merge request do and why?
The boolean settings config.vite.__safe_enabled
and
config.vite.__set_vue_version
were removed from lib/gdk/config.rb
.
The logic for checking that vite.vue_version
is equal to 3
and for
checking that Vite and Webpack are not enabled at the same time was
moved to lib/gdk/services/vite.rb
.
Because I moved logic from lib/gdk/config.rb
to lib/gdk/services/vite.rb
, I also moved the corresponding tests from spec/lib/gdk/config_spec.rb
to spec/gdk/services/vite_spec.rb
.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Enable Vite
- Enable Vite by running
gdk config set vite.enabled true
and disable Webpack withgdk config set webpack.enabled false
. - Then run
gdk reconfigure
, start the GDK withgdk start
and open it in the browser withgdk open
(or just navigate tohttp://127.0.0.1:3000
). - GitLab works as expected.
Running vite and webpack at the same time is unsupported
- Enable Vite and Webpack by running
gdk config set vite.enabled true
andgdk config set webpack.enabled true
. - Then run
gdk reconfigure
. - The following error is thrown:
ERROR: Running vite and webpack at the same time is unsupported. Consider running `gdk config set webpack.enabled false` to disable webpack.
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Merge request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise an issue to follow-up. -
Documentation added/updated, if needed. -
Announcement added, if change is notable. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
Closes #2237 (closed)
Edited by Alexander Ikonomou