From 57c375eaa3b1df14effd11b1a6e13ef50ecb2f02 Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Mon, 2 Dec 2024 08:15:09 +0100 Subject: [PATCH] :wrench: [#724] Disable vite public dir and make base relative Vite copies the contents of public/\* as is into dist, which conflicts with the storybook static build. Furthermore, for how we use and distribute the SDK, the index.html and sdk.html are not relevant anyway, they're only used during local development with CRA. The base change from / to ./ should make things work better when deployed/hosted on an arbitrary subpath. --- vite.config.mts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vite.config.mts b/vite.config.mts index 5a7afa919..67163a5a8 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -43,7 +43,8 @@ const cjsTokens = () => ({ }); export default defineConfig({ - base: '/', + base: './', + publicDir: false, plugins: [ // BIG DISCLAIMER - Vite only processes files with the .jsx or .tsx extension with // babel, and changing this configuration is... cumbersome and comes with a performance