Skip to content

Commit

Permalink
🔧 [#724] Disable vite public dir and make base relative
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sergei-maertens committed Dec 2, 2024
1 parent ebac7d5 commit 57c375e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57c375e

Please sign in to comment.