refactor: Migrate frontend to use Vite and update testing framework
Some checks failed
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 34s
Docker Build and Push / build-and-push (push) Failing after 42s
LabFusion CI/CD Pipeline / service-adapters (push) Successful in 1m2s
LabFusion CI/CD Pipeline / frontend (push) Failing after 1m5s
Integration Tests / integration-tests (push) Failing after 38s
Integration Tests / performance-tests (push) Has been skipped
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m47s
Frontend (React) / test (latest) (push) Failing after 1m14s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
Frontend (React) / build (push) Has been skipped
Frontend (React) / lighthouse (push) Has been skipped
Some checks failed
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 34s
Docker Build and Push / build-and-push (push) Failing after 42s
LabFusion CI/CD Pipeline / service-adapters (push) Successful in 1m2s
LabFusion CI/CD Pipeline / frontend (push) Failing after 1m5s
Integration Tests / integration-tests (push) Failing after 38s
Integration Tests / performance-tests (push) Has been skipped
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m47s
Frontend (React) / test (latest) (push) Failing after 1m14s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
Frontend (React) / build (push) Has been skipped
Frontend (React) / lighthouse (push) Has been skipped
### Summary of Changes - Replaced `react-query` with `@tanstack/react-query` in `package.json` and updated related imports. - Updated frontend CI workflow to use `vitest` for testing instead of Jest, modifying test commands accordingly. - Removed the `App.js`, `Dashboard.js`, `Settings.js`, and other component files, transitioning to a new structure. - Enhanced error handling in the `useServiceStatus` hook to provide more informative error messages. ### Expected Results - Improved performance and modernized the frontend build process with Vite. - Streamlined testing setup with `vitest`, enhancing test execution speed and reliability. - Increased clarity and maintainability of the codebase by adhering to clean code principles and removing unused components.
This commit is contained in:
47
frontend/rsbuild.config.js
Normal file
47
frontend/rsbuild.config.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import { defineConfig } from '@rsbuild/core';
|
||||
import { pluginReact } from '@rsbuild/plugin-react';
|
||||
import { pluginEslint } from '@rsbuild/plugin-eslint';
|
||||
import { pluginTypeCheck } from '@rsbuild/plugin-type-check';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
pluginReact(),
|
||||
pluginEslint({
|
||||
eslintOptions: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
}),
|
||||
pluginTypeCheck(),
|
||||
],
|
||||
server: {
|
||||
port: 3000,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
html: {
|
||||
template: './public/index.html',
|
||||
},
|
||||
output: {
|
||||
distPath: {
|
||||
root: 'build',
|
||||
},
|
||||
},
|
||||
source: {
|
||||
entry: {
|
||||
index: './src/index.js',
|
||||
},
|
||||
},
|
||||
tools: {
|
||||
rspack: {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': './src',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user