From d244f081ee25ca3691648c1dd49efc5c99d67ea4 Mon Sep 17 00:00:00 2001 From: Matt Stover Date: Tue, 24 Sep 2024 17:55:17 -0700 Subject: [PATCH] fix: change storybook build generated js filenames so they do not start with underscores --- .storybook/main.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.storybook/main.js b/.storybook/main.js index 2b8fd156ba..817011135d 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -14,5 +14,19 @@ const config = { docs: { autodocs: "tag", }, + async viteFinal(config) { + // Merge custom configuration into the default config + const { mergeConfig } = await import('vite'); + + return mergeConfig(config, { + build: { + rollupOptions: { + output: { + chunkFileNames: 'assets/entry-[name]-[hash:10].js', + }, + }, + }, + }); + }, }; export default config;