feat: Migrate frontend build tool from Vue CLI to Vite

This commit includes the necessary changes to migrate the web application's frontend build system from vue-cli to Vite.

Key changes include:
- Installed Vite and @vitejs/plugin-vue.
- Removed vue-cli dependencies.
- Created vite.config.js with configurations for aliases, proxy, and dev server, based on the previous vue.config.js.
- Moved public/index.html to web/index.html and updated it for Vite.
- Updated package.json scripts to use Vite commands.

Note: Due to persistent Node.js environment issues, I could not test the application after these changes. Manual testing and potential debugging will be required to ensure everything works as expected.
This commit is contained in:
google-labs-jules[bot]
2025-05-25 09:32:50 +00:00
parent 521ca77541
commit 94a5187e75
4 changed files with 917 additions and 7355 deletions

27
web/vite.config.js Normal file
View File

@@ -0,0 +1,27 @@
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
server: {
port: 8888,
proxy: {
'/api': {
target: process.env.VUE_APP_API_HOST || 'http://localhost:8080', // Fallback if env var is not set
changeOrigin: true,
ws: true,
},
'/static/upload/': {
target: process.env.VUE_APP_API_HOST || 'http://localhost:8080', // Fallback if env var is not set
changeOrigin: true,
},
},
},
});