chore: migrate from webpack to vite#169
Merged
Merged
Conversation
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the Vue frontend build/dev tooling from Vue CLI (webpack) to Vite, while keeping runtime configurability (base path + API/auth settings) via config.json.
Changes:
- Replace Vue CLI configuration with Vite (
vite.config.js, newindex.html, updatedpackage.jsonscripts). - Introduce runtime/base-path helpers (
src/composables/runtime.js) and update router/auth/config consumers accordingly. - Update Docker/Nginx packaging and add a post-build patch script to make runtime asset loading work under subpaths.
Reviewed changes
Copilot reviewed 30 out of 32 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| vue.config.js | Removes Vue CLI/webpack configuration (dev proxy, eslint plugin wiring, publicPath). |
| vite.config.js | Adds Vite config (Vue plugin, @ alias, dev proxy). |
| src/views/HomeView.vue | Uses runtime-aware dashboard URL helper. |
| src/router/index.js | Switches auth/base-path logic to runtime composable and sets router history base. |
| src/plugins/webfontloader.js | Removes webpack chunk naming comment for dynamic import. |
| src/plugins/vuetify.js | Registers Vuetify components/directives for Vite/Vuetify 3 compatibility. |
| src/main.js | Bootstraps runtime config and conditionally installs Auth0 with runtime-derived redirect URL. |
| src/composables/runtime.js | New: centralizes runtime config access + base path/url helpers + auth enable flag. |
| src/composables/api.js | Reads API base URL from runtime config instead of global config. |
| src/components/scm/_summary.vue | Replaces Vue CLI env flag usage with isAuthEnabled. |
| src/components/scm/_filter.vue | Replaces Vue CLI env flag usage with isAuthEnabled. |
| src/components/pipeline/reports.vue | Replaces Vue CLI env flag usage with isAuthEnabled. |
| src/components/pipeline/report.vue | Replaces Vue CLI env flag usage with isAuthEnabled. |
| src/components/pipeline/configs/configs.vue | Replaces Vue CLI env flag usage with isAuthEnabled. |
| src/components/pipeline/configs/config.vue | Replaces Vue CLI env flag usage with isAuthEnabled. |
| src/components/pipeline/configs/_configsSearch.vue | Replaces Vue CLI env flag usage with isAuthEnabled. |
| src/components/SideNavigation.vue | Switches auth enable check to runtime composable. |
| src/components/HeadNavigation.vue | Switches auth enable check and logout return URL to runtime base URL. |
| scripts/patch-runtime-assets.mjs | New: post-build patching to load CSS/JS assets relative to runtime <base>. |
| public/index.html | Removes Vue CLI HTML template. |
| package.json | Replaces Vue CLI scripts/deps with Vite equivalents and adds post-build patch step. |
| index.html | New Vite entry HTML with runtime config.json loader + dynamic <base> injection. |
| docker/nginx/conf.d/default.conf | Updates Nginx routing to support serving assets when mounted under subpaths. |
| docker/config.json | Adds API_BASE_URL and APP_BASE_PATH to runtime config example. |
| docker/config.js | Removes old runtime JS config file. |
| docker-entrypoint.sh | Removes old base URL injection script for Vue CLI template. |
| babel.config.js | Removes Vue CLI Babel preset configuration. |
| README.md | Updates dev commands and documents new runtime config + Docker mounting approach. |
| Dockerfile | Removes config.js/entrypoint wiring; ships config.json and updated Nginx conf. |
| .gitignore | Stops ignoring public/config.js since it’s removed. |
| .env | Renames Vue CLI env var to Vite env var. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 30 out of 32 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Test
To test this pull request, you can run the following commands:
Additional Information
Tradeoff
Potential improvement