From 1e68fe91490498cf7f87af384f823ba5898ed08f Mon Sep 17 00:00:00 2001 From: Sivamani-18 Date: Wed, 24 Jul 2024 19:30:35 +0530 Subject: [PATCH] update app page env --- src/App.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index aae6a41..dc79154 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,5 @@ +import React from 'react'; import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; - import './App.css'; import Home from './pages/Home'; import About from './pages/About'; @@ -7,9 +7,11 @@ import Header from './components/Header/Header'; function App() { const basename = - process.env.NODE_ENV === 'production' ? process.env.VITE_APP_BASENAME : '/'; + import.meta.env.MODE === 'production' + ? import.meta.env.VITE_APP_BASENAME + : '/'; - console.log('basename', basename); + console.log('basename', basename, import.meta.env.VITE_APP_BASENAME); return (