From 97be344b0198d331efec9efe284a40f4f580d49f Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Tue, 29 Oct 2024 16:20:46 +0530 Subject: [PATCH] chore(buddybook): fix hosting --- examples/buddybook/index.html | 1 + examples/buddybook/public/_redirects | 1 + examples/buddybook/vite.config.ts | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 examples/buddybook/public/_redirects diff --git a/examples/buddybook/index.html b/examples/buddybook/index.html index 68dcccf..74fc740 100644 --- a/examples/buddybook/index.html +++ b/examples/buddybook/index.html @@ -4,6 +4,7 @@ BuddyBook Dogfood +
diff --git a/examples/buddybook/public/_redirects b/examples/buddybook/public/_redirects new file mode 100644 index 0000000..d4a8960 --- /dev/null +++ b/examples/buddybook/public/_redirects @@ -0,0 +1 @@ +/* /index.html 200 \ No newline at end of file diff --git a/examples/buddybook/vite.config.ts b/examples/buddybook/vite.config.ts index 5790e82..3827d67 100644 --- a/examples/buddybook/vite.config.ts +++ b/examples/buddybook/vite.config.ts @@ -9,4 +9,16 @@ export default defineConfig({ "@": path.resolve(__dirname, "./src"), }, }, + base: './', + build: { + assetsDir: 'assets', + manifest: true, + rollupOptions: { + output: { + entryFileNames: 'assets/[name]-[hash].js', + chunkFileNames: 'assets/[name]-[hash].js', + assetFileNames: 'assets/[name]-[hash].[ext]' + } + } + } })