Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

storybook: adjust for static build

Scott Wilsonaf376c0984c7
diff --git a/frontend/.storybook/main.ts b/frontend/.storybook/main.ts
index 0a7b7adb52..5ca66a77f6 100644
--- a/frontend/.storybook/main.ts
+++ b/frontend/.storybook/main.ts
@@ -9,6 +9,18 @@ const config: StorybookConfig = {
framework: {
name: "@storybook/react-vite",
options: {}
+ },
+ viteFinal: async (viteConfig) => {
+ // The main app's vite.config.ts uses experimental.renderBuiltUrl to route
+ // asset URLs through window.__toCdnUrl(...), a runtime function injected
+ // by the standalone Docker deployment's serving layer. Storybook's static
+ // deploy (e.g. Render) has no such injection, so strip the override and
+ // let Vite emit plain relative URLs.
+ const { renderBuiltUrl, ...experimental } = viteConfig.experimental ?? {};
+ return {
+ ...viteConfig,
+ experimental
+ };
}
};
export default config;