From 85f57dcab5f5863a552caae78e27a50a108b819b Mon Sep 17 00:00:00 2001 From: Boryana Todorova Date: Sat, 16 Nov 2024 19:43:06 +0200 Subject: [PATCH] chore: resolve error page not found --- examples/ecommerce-jewellery-store/index.html | 9 +++++++++ examples/ecommerce-jewellery-store/public/404.html | 13 +++++++++++++ examples/ecommerce-jewellery-store/vite.config.ts | 9 ++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 examples/ecommerce-jewellery-store/public/404.html diff --git a/examples/ecommerce-jewellery-store/index.html b/examples/ecommerce-jewellery-store/index.html index af77d546..fbbb69d4 100644 --- a/examples/ecommerce-jewellery-store/index.html +++ b/examples/ecommerce-jewellery-store/index.html @@ -17,6 +17,15 @@
+ \ No newline at end of file diff --git a/examples/ecommerce-jewellery-store/public/404.html b/examples/ecommerce-jewellery-store/public/404.html new file mode 100644 index 00000000..ed4503f7 --- /dev/null +++ b/examples/ecommerce-jewellery-store/public/404.html @@ -0,0 +1,13 @@ + + + + + + Page Not Found + + + + + \ No newline at end of file diff --git a/examples/ecommerce-jewellery-store/vite.config.ts b/examples/ecommerce-jewellery-store/vite.config.ts index d94269f3..52eea9e8 100644 --- a/examples/ecommerce-jewellery-store/vite.config.ts +++ b/examples/ecommerce-jewellery-store/vite.config.ts @@ -1,6 +1,7 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import path from 'path'; +import { resolve } from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); @@ -16,6 +17,12 @@ export default defineConfig({ }, }, build: { - outDir: 'build' + outDir: 'build', + rollupOptions: { + input: { + main: resolve(__dirname, "index.html"), + 404: resolve(__dirname, "public/404.html"), + }, + }, }, }); \ No newline at end of file