From a3e799d65db9a84feb87e9a69c1bd344a054b1d3 Mon Sep 17 00:00:00 2001 From: Matt DiMeglio Date: Tue, 20 May 2025 12:33:08 -0400 Subject: [PATCH] src alias --- README.md | 2 +- src/main.jsx | 4 ++-- src/router/AppRouter.jsx | 2 +- vite.config.js | 12 +++++++++--- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9fd5bbe..c8b6ec3 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/src/main.jsx b/src/main.jsx index eedb0b8..3e08861 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -1,8 +1,8 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import { BrowserRouter } from 'react-router-dom'; -import AppRouter from './router/AppRouter'; -import { AppProvider } from './context'; +import AppRouter from '@src/router/AppRouter'; +import { AppProvider } from '@src/context'; ReactDOM.createRoot(document.getElementById('root')).render( diff --git a/src/router/AppRouter.jsx b/src/router/AppRouter.jsx index 9948acb..ce7f379 100644 --- a/src/router/AppRouter.jsx +++ b/src/router/AppRouter.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { Routes, Route } from 'react-router-dom'; -import { Home, About } from '../pages'; +import { Home, About } from '@src/pages'; const AppRouter = () => { return ( diff --git a/vite.config.js b/vite.config.js index 8b0f57b..ffd4805 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,7 +1,13 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import path from 'path'; // https://vite.dev/config/ export default defineConfig({ plugins: [react()], -}) + resolve: { + alias: { + '@src': path.resolve(__dirname, 'src'), + }, + }, +});