diff options
author | Michael Hunteman <michael@huntm.net> | 2024-09-28 10:55:35 -0700 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2024-09-28 11:25:16 -0700 |
commit | 0154a152dd6d3606c9131f3186a9175ee5853185 (patch) | |
tree | a166f0cf3819607592fb5ee03255108563f4ba68 /client | |
parent | 99b5a49b5fcccb7c6523a95c67e39830bc2a2a45 (diff) |
Use api endpoint for backend
Diffstat (limited to 'client')
-rw-r--r-- | client/.env | 1 | ||||
-rw-r--r-- | client/.env.development | 1 | ||||
-rw-r--r-- | client/.env.production | 1 | ||||
-rw-r--r-- | client/.env.test | 1 | ||||
-rw-r--r-- | client/README.md | 30 | ||||
-rw-r--r-- | client/package.json | 12 | ||||
-rw-r--r-- | client/tsconfig.json | 3 | ||||
-rw-r--r-- | client/vitest.config.ts (renamed from client/vite.config.ts) | 4 |
8 files changed, 7 insertions, 46 deletions
diff --git a/client/.env b/client/.env deleted file mode 100644 index 2f560b8..0000000 --- a/client/.env +++ /dev/null @@ -1 +0,0 @@ -VITE_BASE_URL=http://192.168.1.18:8080/ diff --git a/client/.env.development b/client/.env.development new file mode 100644 index 0000000..be2cee9 --- /dev/null +++ b/client/.env.development @@ -0,0 +1 @@ +VITE_BASE_URL=http://192.168.1.18:8080/api/ diff --git a/client/.env.production b/client/.env.production new file mode 100644 index 0000000..7e27439 --- /dev/null +++ b/client/.env.production @@ -0,0 +1 @@ +VITE_BASE_URL=https://localhost:8080/api/ diff --git a/client/.env.test b/client/.env.test new file mode 100644 index 0000000..be2cee9 --- /dev/null +++ b/client/.env.test @@ -0,0 +1 @@ +VITE_BASE_URL=http://192.168.1.18:8080/api/ diff --git a/client/README.md b/client/README.md deleted file mode 100644 index 0d6babe..0000000 --- a/client/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# React + TypeScript + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: - -- Configure the top-level `parserOptions` property like this: - -```js -export default { - // other rules... - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - project: ['./tsconfig.json', './tsconfig.node.json'], - tsconfigRootDir: __dirname, - }, -} -``` - -- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` -- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` -- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list diff --git a/client/package.json b/client/package.json index 0990aa3..eda5a5b 100644 --- a/client/package.json +++ b/client/package.json @@ -13,14 +13,11 @@ "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", - "@fontsource/roboto": "^5.0.14", "@mui/icons-material": "^5.16.7", - "@mui/lab": "^5.0.0-alpha.165", "@mui/material": "^5.16.7", "@mui/x-date-pickers": "^7.14.0", "@reduxjs/toolkit": "^2.2.1", "material-react-table": "^2.13.1", - "prettier": "^3.2.5", "react": "^18.2.0", "react-dom": "^18.2.0", "react-hook-form": "^7.50.1", @@ -28,23 +25,18 @@ "react-router-dom": "^6.22.0" }, "devDependencies": { - "@hookform/devtools": "^4.3.1", "@testing-library/jest-dom": "^6.5.0", "@testing-library/react": "^16.0.1", "@testing-library/user-event": "^14.5.2", - "@types/bun": "^1.1.0", - "@types/react": "^18.2.55", - "@types/react-dom": "^18.2.19", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", - "@vitejs/plugin-react": "^4.2.1", "eslint": "^8.56.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", "jsdom": "^25.0.0", "msw": "^2.2.1", - "typescript": "^5.2.2", - "vite": "^5.4.2", + "typescript": "^5.6.2", + "vite": "^5.4.8", "vitest": "^2.1.1" } } diff --git a/client/tsconfig.json b/client/tsconfig.json index 4c214ba..0b04524 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -7,7 +7,6 @@ "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, - "types": ["vite/client"], // Bundler mode "moduleResolution": "bundler", @@ -25,5 +24,5 @@ "noUnusedParameters": true, "noPropertyAccessFromIndexSignature": true }, - "include": ["vite-env.d.ts", "vite.config.ts"] + "include": ["vite-env.d.ts", "vitest.config.ts"] } diff --git a/client/vite.config.ts b/client/vitest.config.ts index 2942029..2de257c 100644 --- a/client/vite.config.ts +++ b/client/vitest.config.ts @@ -1,10 +1,8 @@ /// <reference types="vitest" /> -import { defineConfig } from 'vite'; -import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vitest/config'; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], test: { globals: true, environment: 'jsdom', |