diff --git a/frontend/package.json b/frontend/package.json index 5822065..aad42c6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -31,6 +31,7 @@ }, "devDependencies": { "@eslint/js": "^9.11.1", + "@types/node": "^22.7.6", "@types/react": "^18.3.10", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.2", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index dd30545..95e28c7 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -66,6 +66,9 @@ importers: '@eslint/js': specifier: ^9.11.1 version: 9.12.0 + '@types/node': + specifier: ^22.7.6 + version: 22.7.6 '@types/react': specifier: ^18.3.10 version: 18.3.11 @@ -74,7 +77,7 @@ importers: version: 18.3.0 '@vitejs/plugin-react': specifier: ^4.3.2 - version: 4.3.2(vite@5.4.8) + version: 4.3.2(vite@5.4.8(@types/node@22.7.6)) autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.47) @@ -104,7 +107,7 @@ importers: version: 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) vite: specifier: ^5.4.8 - version: 5.4.8 + version: 5.4.8(@types/node@22.7.6) packages: @@ -1066,6 +1069,9 @@ packages: '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} + '@types/node@22.7.6': + resolution: {integrity: sha512-/d7Rnj0/ExXDMcioS78/kf1lMzYk4BZV8MZGTBKzTGZ6/406ukkbYlIsZmMPhcR5KlkunDHQLrtAVmSq7r+mSw==} + '@types/prop-types@15.7.13': resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} @@ -2237,6 +2243,9 @@ packages: engines: {node: '>=14.17'} hasBin: true + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + unified@11.0.5: resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} @@ -3317,6 +3326,10 @@ snapshots: '@types/ms@0.7.34': {} + '@types/node@22.7.6': + dependencies: + undici-types: 6.19.8 + '@types/prop-types@15.7.13': {} '@types/react-dom@18.3.0': @@ -3415,14 +3428,14 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-react@4.3.2(vite@5.4.8)': + '@vitejs/plugin-react@4.3.2(vite@5.4.8(@types/node@22.7.6))': dependencies: '@babel/core': 7.25.8 '@babel/plugin-transform-react-jsx-self': 7.25.7(@babel/core@7.25.8) '@babel/plugin-transform-react-jsx-source': 7.25.7(@babel/core@7.25.8) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.8 + vite: 5.4.8(@types/node@22.7.6) transitivePeerDependencies: - supports-color @@ -4684,6 +4697,8 @@ snapshots: typescript@5.6.3: {} + undici-types@6.19.8: {} + unified@11.0.5: dependencies: '@types/unist': 3.0.3 @@ -4754,12 +4769,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite@5.4.8: + vite@5.4.8(@types/node@22.7.6): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.0 optionalDependencies: + '@types/node': 22.7.6 fsevents: 2.3.3 wavesurfer.js@6.6.4: {} diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index fec8c8e..27eb941 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -6,6 +6,8 @@ ], "compilerOptions": { "baseUrl": ".", + "types": ["node"], + "moduleResolution": "node", "paths": { "@/*": ["./src/*"] } diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index d70b1d6..0201731 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,13 +1,12 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' -import path from "path" // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], resolve: { alias: { - "@": path.resolve(__dirname, "./src"), + "@": "/src", }, }, })