Skip to content

[Feature]-Migrate the frontend build from Vue CLI to Vite: #121

Description

@hizclick

Is your feature request related to a problem? Please describe.

The project currently builds with Vue CLI 5 (webpack), which causes two ongoing problems:

  1. A peer-dependency conflict between vue3-jest and @vue/cli-plugin-unit-jestforces every install (locally, in the Dockerfile, and in all CI workflows, including the npm audit workflow) to use npm install --legacy-peer-deps.
  2. npm audit reports several advisories in the Vue CLI / webpack-dev-server build toolchain that have no upstream fix. These are currently only handled by scoping the CI audit gate to production dependencies, so the findings sit unresolved in every full audit run.

Describe the solution you'd like

Migrate the frontend build from Vue CLI to Vite:

  • Replace @vue/cli-service with vite + @vitejs/plugin-vue
  • Move index.html to the project root and update the entry script
  • Port vue.config.js settings (aliases, sass options, dev-server config)
    to vite.config.js
  • Rename env vars from VUE_APP_* to VITE_* and switch reads to
    import.meta.env
  • Convert any require() / require.context() usage to ESM /
    import.meta.glob()
  • Migrate the test suite from Jest (vue3-jest) to Vitest, which removes
    the peer-dependency conflict at its source
  • Update tauri.conf.json (beforeDevCommand, devPath/frontendDist)
    for the Vite dev server
  • Remove --legacy-peer-deps from the Dockerfile and all CI workflows

Expected outcome: clean npm ci without flags, most outstanding audit
findings resolved, and a significantly faster dev server.

Describe alternatives you've considered

  • Keep Vue CLI and continue using --legacy-peer-deps with a production-scoped audit gate — this is the current workaround, but it leaves the toolchain advisories permanently unfixable since Vue CLI is in maintenance mode.
  • Migrate only the test runner to Vitest while keeping the webpack build — would fix the peer conflict but not the webpack-dev-server advisories, and mixing toolchains adds complexity for little benefit.

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions