From c75d62551010e209c38d8a0bfbbd0c0753f0e534 Mon Sep 17 00:00:00 2001 From: wheattoast11 Date: Sat, 30 Nov 2024 13:27:16 -0600 Subject: [PATCH] finalize --- .github/workflows/deploy.yml | 2 ++ src/App.jsx | 2 +- vite.config.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 781688c..ed15a47 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,6 +20,8 @@ jobs: run: npm ci - name: Build run: npm run build + env: + NODE_ENV: production - name: Add routing files run: | cp dist/index.html dist/404.html diff --git a/src/App.jsx b/src/App.jsx index 765d448..6a3ba4a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,5 +1,5 @@ import React, { Suspense, lazy, useEffect } from 'react'; -import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; +import { HashRouter as Router, Routes, Route } from 'react-router-dom'; import LoadingState from './components/LoadingState'; import Canvas from './components/Canvas'; import ErrorBoundary from './components/ErrorBoundary'; diff --git a/vite.config.js b/vite.config.js index 6b09cb9..9a5b99c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,7 +2,7 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; export default defineConfig({ - base: '/', + base: process.env.NODE_ENV === 'production' ? '/intuition-labs-website/' : '/', plugins: [react()], build: { outDir: 'dist',