Skip to content

Retire config.vite.__safe_enabled and config.vite.__set_vue_version

  • 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

  1. Enable Vite by running gdk config set vite.enabled true and disable Webpack with gdk config set webpack.enabled false.
  2. Then run gdk reconfigure, start the GDK with gdk start and open it in the browser with gdk open (or just navigate to http://127.0.0.1:3000).
  3. GitLab works as expected.

Running vite and webpack at the same time is unsupported

  1. Enable Vite and Webpack by running gdk config set vite.enabled true and gdk config set webpack.enabled true.
  2. Then run gdk reconfigure.
  3. 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:

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 the CHANGELOG.md.

Closes #2237 (closed)

Edited by Alexander Ikonomou

Merge request reports

Loading