---
title: "Comment by Mohd Shan on \"Deploy Vite React App on Both GitHub Pages and Vercel\" | Hashnode"
description: "process is now removed from vite also in vite config we cant access env direct, instead we have to use loadENV from vite, like below:- import { defineConfig, lo"
url: "https://hashnode.com/posts/deploy-vite-react-app-on-both-github-pages-and-vercel/655b0dd498305e394867a634/comment/673ca8ef32c13a9c76a23076"
---

[Discussion](https://hashnode.com/posts/deploy-vite-react-app-on-both-github-pages-and-vercel/655b0dd498305e394867a634)

Comment [Deploy Vite React App on Both GitHub Pages and Vercel](https://hashnode.com/posts/deploy-vite-react-app-on-both-github-pages-and-vercel/655b0dd498305e394867a634)

[Mohd Shan](https://hashnode.com/@mohdshan)

[Nov 19, 2024](https://hashnode.com/posts/deploy-vite-react-app-on-both-github-pages-and-vercel/655b0dd498305e394867a634/comment/673ca8ef32c13a9c76a23076)

process is now removed from vite also in vite config we cant access env direct, instead we have to use loadENV from vite, like below:-

import { defineConfig, loadEnv } from 'vite';

export default defineConfig(({ mode }) => {

const env = loadEnv(mode, '.', 'VITE\_');

return {

base: env.VITE\_BASE\_PATH || "/your-repo-name",

// Other Vite configurations

};

});

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1732028650730/605392f1-8a50-4bbf-94c1-c1e4053b33a8.png)
