From 6df28966be356b6324af9a3cc6a14929d2d23b0b Mon Sep 17 00:00:00 2001
From: Spectralitree <72747870+Spectralitree@users.noreply.github.com>
Date: Sun, 12 Dec 2021 12:56:26 +0100
Subject: [PATCH] fix: actually fix spa routing
---
 docs/404.html                                 | 40 +++++++++++++++++++
 docs/CNAME                                    |  1 -
 .../{index.fe151802.js => main.3cf66444.js}   |  0
 .../{index.b38ea81b.css => main.4f449199.css} |  0
 docs/index.html                               | 29 +++++++++++++-
 vite.config.js                                | 13 ++++--
 6 files changed, 77 insertions(+), 6 deletions(-)
 create mode 100644 docs/404.html
 delete mode 100644 docs/CNAME
 rename docs/assets/{index.fe151802.js => main.3cf66444.js} (100%)
 rename docs/assets/{index.b38ea81b.css => main.4f449199.css} (100%)
diff --git a/docs/404.html b/docs/404.html
new file mode 100644
index 00000000..fb3f2dbb
--- /dev/null
+++ b/docs/404.html
@@ -0,0 +1,40 @@
+
+
+  
+    
+    Single Page Apps for GitHub Pages
+    
+  
+  
+  
+
\ No newline at end of file
diff --git a/docs/CNAME b/docs/CNAME
deleted file mode 100644
index e408adf7..00000000
--- a/docs/CNAME
+++ /dev/null
@@ -1 +0,0 @@
-pk-webs-beta.spectralitree.com
\ No newline at end of file
diff --git a/docs/assets/index.fe151802.js b/docs/assets/main.3cf66444.js
similarity index 100%
rename from docs/assets/index.fe151802.js
rename to docs/assets/main.3cf66444.js
diff --git a/docs/assets/index.b38ea81b.css b/docs/assets/main.4f449199.css
similarity index 100%
rename from docs/assets/index.b38ea81b.css
rename to docs/assets/main.4f449199.css
diff --git a/docs/index.html b/docs/index.html
index 69fe9e42..400c25e2 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -7,10 +7,35 @@
     pk-webs | home
     
     
-    
+
+    
+    
+    
+    
     
     
-    
+    
   
   
     
diff --git a/vite.config.js b/vite.config.js
index 10e84868..7335d595 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,3 +1,4 @@
+import resolve from 'path';
 import { defineConfig } from 'vite'
 import { svelte } from '@sveltejs/vite-plugin-svelte'
 
@@ -5,10 +6,16 @@ import { svelte } from '@sveltejs/vite-plugin-svelte'
 export default defineConfig({
   plugins: [svelte()],
   optimizeDeps: { exclude: ["svelte-navigator"] },
-  build: {
-    outDir: "docs"
-  },
   server: {
     https: true
+  },
+  build: {
+    rollupOptions: {
+      input: {
+        main: 'index.html',
+        404: '404.html'
+      },
+    },
+    outDir: "docs"
   }
 })