diff --git a/src/main.tsx b/src/main.tsx index 93db3799..6a2dfd8b 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,7 +1,7 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import App from './App.tsx'; -import './index.css'; +import App from '@/App.tsx'; +import '@/index.css'; ReactDOM.createRoot(document.getElementById('root')!).render( diff --git a/tsconfig.json b/tsconfig.json index 461ae7cb..9cc7d98c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,11 @@ "module": "ESNext", "skipLibCheck": true, + /*Configure TypeScript Paths*/ + "paths": { + "@/*": ["./src/*"], + }, + /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true, diff --git a/vite.config.ts b/vite.config.ts index df9d353c..b876f533 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -19,4 +19,14 @@ export default defineConfig({ environment: 'jsdom', setupFiles: ['./src/__test__/setupTests.ts'], }, + resolve: { + alias: { + '@': path.resolve(__dirname, './src'), + }, + }, + build: { + rollupOptions: { + external: ['src/App.tsx'], + }, + }, });