---
title: "Discussion on \"Deploy Vite React App on Both GitHub Pages and Vercel\" | Hashnode"
description: "Discussion on \"Deploy Vite React App on Both GitHub Pages and Vercel\". Explore Step-by-Step Deployment: Simultaneously Deploy Your Vite React App on GitHub Pages and Vercel"
url: "https://hashnode.com/posts/deploy-vite-react-app-on-both-github-pages-and-vercel/655b0dd498305e394867a634"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Deploy Vite React App on Both GitHub Pages and Vercel](https://robiul.dev/deploy-vite-react-app-on-both-github-pages-and-vercel?utm_source=hashnode&utm_medium=feed)

Explore Step-by-Step Deployment: Simultaneously Deploy Your Vite React App on GitHub Pages and Vercel

Nov 20, 2023 · 8 min read · robiul.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#vite](https://hashnode.com/tag/vite)
-   [#vercel](https://hashnode.com/tag/vercel)
-   [#github](https://hashnode.com/tag/github)
-   [#github-actions-1](https://hashnode.com/tag/github-actions-1)

## Written by

[Robiul H.](https://hashnode.com/@robiulhr)

@robiulhr · Bhairab Bazar, Bangladesh

  
[View profile](https://hashnode.com/@robiulhr)

Professional Web Developer

🕵🏻 Professional Web Developer ✍ Technical Writer • 👨‍💻 Making Web Development easier for beginners • ⚡ JavaScript &amp; Node js

## Responses

Markdown supported · ⌘↵ to post

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

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

process.env is removed from Vite. Now they use import.meta but it also doesn't work in a Vite config file only. In the Vite config, we have to use the loadENV method.

![Screenshot 2024-11-19 203404.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1732118907191/8f6dc997-a23c-46ae-839c-04e5d0d90880.png)

[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)
