From b461a8705687298c29801689f8a80c2822c5a929 Mon Sep 17 00:00:00 2001 From: Lorenzo Andraghetti Date: Tue, 14 Jan 2025 13:16:33 +0100 Subject: [PATCH] Fix redirects problem (#23) --- frontend/index.html | 15 +++++++++++++++ frontend/public/404.html | 24 ++++++++++++++++++++++++ frontend/public/_redirects | 1 + frontend/vite.config.ts | 33 +++++++++++++++------------------ 4 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 frontend/public/404.html create mode 100644 frontend/public/_redirects diff --git a/frontend/index.html b/frontend/index.html index e92066d..bc974fe 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -5,6 +5,21 @@ The Good AI Lab +
diff --git a/frontend/public/404.html b/frontend/public/404.html new file mode 100644 index 0000000..6f4fa10 --- /dev/null +++ b/frontend/public/404.html @@ -0,0 +1,24 @@ + + + + + The Good AI Lab + + + + + \ No newline at end of file diff --git a/frontend/public/_redirects b/frontend/public/_redirects new file mode 100644 index 0000000..d4a8960 --- /dev/null +++ b/frontend/public/_redirects @@ -0,0 +1 @@ +/* /index.html 200 \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 13df798..3e2d498 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -3,24 +3,21 @@ import react from '@vitejs/plugin-react'; import ViteYaml from '@modyfi/vite-plugin-yaml'; // https://vitejs.dev/config/ -export default defineConfig(() => { - return { - base: './', - plugins: [ - react(), - ViteYaml(), - ], - optimizeDeps: { - exclude: ['lucide-react'], - include: ['@modyfi/vite-plugin-yaml'] - }, - build: { - assetsDir: 'assets', - rollupOptions: { - output: { - assetFileNames: 'assets/[name].[hash][extname]' - } +export default defineConfig({ + plugins: [ + react(), + ViteYaml(), + ], + optimizeDeps: { + exclude: ['lucide-react'], + include: ['@modyfi/vite-plugin-yaml'] + }, + build: { + assetsDir: 'assets', + rollupOptions: { + output: { + assetFileNames: 'assets/[name].[hash][extname]' } } - }; + } });