feat: setup @ for importing in the frontend

This commit is contained in:
Haileyesus
2026-03-26 13:16:56 +03:00
parent 85364e0234
commit fdad9acc2e
2 changed files with 10 additions and 0 deletions

View File

@@ -4,6 +4,10 @@
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
"skipLibCheck": true,
"moduleResolution": "Bundler",
"resolveJsonModule": true,

View File

@@ -1,3 +1,4 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
import { getConnectableHost, normalizeLoopbackHost } from './shared/networkHosts.js'
@@ -19,6 +20,11 @@ export default defineConfig(({ mode }) => {
return {
plugins: [react()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
host,
port: parseInt(env.VITE_PORT) || 5173,