Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Fix race condition in storybook (#8619)

James Brunton09b6fe7a9bca
diff --git a/frontend/.storybook/main.ts b/frontend/.storybook/main.ts
index 555faa5b17..4d6d923509 100644
--- a/frontend/.storybook/main.ts
+++ b/frontend/.storybook/main.ts
@@ -56,6 +56,9 @@ const config: StorybookConfig = {
// intercept network calls the same way the dev portal does.
staticDirs: ["../public"],
viteFinal: async (config) => {
+ // The auto-loaded app config's default publicDir is the same public/ that
+ // staticDirs copies.
+ config.publicDir = false;
// Wire the @portal/* alias directly on the Storybook bundler so portal
// story imports resolve without needing the portal's vite config.
config.resolve = config.resolve ?? {};