src alias

This commit is contained in:
Matt DiMeglio 2025-05-20 12:33:08 -04:00
parent a81b207a64
commit a3e799d65d
4 changed files with 13 additions and 7 deletions

View file

@ -1,4 +1,4 @@
# React + Vite # Welcome to ShiftSync 👋
This is a new project, directed to create a website and app that is new, innovative, and works efficiently to schedule first responders/employees to shifts. The website and app is directed toward volunteer agencies specifically in both Fire Department and EMS fields. The website and app is currently in development and will hope to reach alpha by end of 2025. This is a new project, directed to create a website and app that is new, innovative, and works efficiently to schedule first responders/employees to shifts. The website and app is directed toward volunteer agencies specifically in both Fire Department and EMS fields. The website and app is currently in development and will hope to reach alpha by end of 2025.

View file

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom/client'; import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom'; import { BrowserRouter } from 'react-router-dom';
import AppRouter from './router/AppRouter'; import AppRouter from '@src/router/AppRouter';
import { AppProvider } from './context'; import { AppProvider } from '@src/context';
ReactDOM.createRoot(document.getElementById('root')).render( ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode> <React.StrictMode>

View file

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { Routes, Route } from 'react-router-dom'; import { Routes, Route } from 'react-router-dom';
import { Home, About } from '../pages'; import { Home, About } from '@src/pages';
const AppRouter = () => { const AppRouter = () => {
return ( return (

View file

@ -1,7 +1,13 @@
import { defineConfig } from 'vite' import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react';
import path from 'path';
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()],
}) resolve: {
alias: {
'@src': path.resolve(__dirname, 'src'),
},
},
});