From ade85b90d1eb8c7efe197d3046980d6816e77964 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 20 Dec 2024 12:56:43 +0100 Subject: [PATCH 1/2] add extra entries to optimizeDeps --- .../builders/builder-vite/src/optimizeDeps.ts | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/code/builders/builder-vite/src/optimizeDeps.ts b/code/builders/builder-vite/src/optimizeDeps.ts index cbade7a268a6..7a6c35e4f2e7 100644 --- a/code/builders/builder-vite/src/optimizeDeps.ts +++ b/code/builders/builder-vite/src/optimizeDeps.ts @@ -13,16 +13,56 @@ const INCLUDE_CANDIDATES = [ '@emotion/core', '@emotion/is-prop-valid', '@emotion/styled', + '@storybook/addon-a11y/preview', + '@storybook/addon-backgrounds/preview', + '@storybook/addon-designs/blocks', + '@storybook/addon-docs/preview', + '@storybook/addon-essentials/actions/preview', + '@storybook/addon-essentials/actions/preview', + '@storybook/addon-essentials/backgrounds/preview', + '@storybook/addon-essentials/docs/preview', + '@storybook/addon-essentials/highlight/preview', + '@storybook/addon-essentials/measure/preview', + '@storybook/addon-essentials/outline/preview', + '@storybook/addon-essentials/viewport/preview', + '@storybook/addon-highlight/preview', + '@storybook/addon-links/preview', + '@storybook/addon-measure/preview', + '@storybook/addon-outline/preview', + '@storybook/addon-themes', + '@storybook/addon-themes/preview', + '@storybook/addon-viewport', + '@storybook/addon-viewport/preview', + '@storybook/blocks', + '@storybook/components', + '@storybook/experimental-addon-test/preview', + '@storybook/html', + '@storybook/html/dist/entry-preview-docs.mjs', + '@storybook/html/dist/entry-preview.mjs', + '@storybook/preact', + '@storybook/preact/dist/entry-preview-docs.mjs', + '@storybook/preact/dist/entry-preview.mjs', '@storybook/react > acorn-jsx', '@storybook/react', + '@storybook/react/dist/entry-preview-docs.mjs', + '@storybook/react/dist/entry-preview.mjs', '@storybook/svelte', + '@storybook/svelte/dist/entry-preview-docs.mjs', + '@storybook/svelte/dist/entry-preview.mjs', + '@storybook/theming', '@storybook/vue3', + '@storybook/vue3/dist/entry-preview-docs.mjs', + '@storybook/vue3/dist/entry-preview.mjs', + '@storybook/web-components', + '@storybook/web-components/dist/entry-preview-docs.mjs', + '@storybook/web-components/dist/entry-preview.mjs', 'acorn-jsx', 'acorn-walk', 'acorn', 'airbnb-js-shims', 'ansi-to-html', 'axe-core', + 'chromatic/isChromatic', 'color-convert', 'deep-object-diff', 'doctrine', @@ -73,6 +113,7 @@ const INCLUDE_CANDIDATES = [ 'lodash/upperFirst.js', 'lodash/upperFirst', 'memoizerific', + 'msw-storybook-addon', 'overlayscrollbars', 'polished', 'prettier/parser-babel', @@ -102,6 +143,7 @@ const INCLUDE_CANDIDATES = [ 'regenerator-runtime/runtime.js', 'slash', 'store2', + 'storybook/internal/preview/runtime', 'synchronous-promise', 'telejson', 'ts-dedent', From 7ec361e11afc17526b2f32834179d14093c23aa0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 20 Dec 2024 13:06:04 +0100 Subject: [PATCH 2/2] add more --- code/builders/builder-vite/src/optimizeDeps.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/builders/builder-vite/src/optimizeDeps.ts b/code/builders/builder-vite/src/optimizeDeps.ts index 7a6c35e4f2e7..74dd0090be42 100644 --- a/code/builders/builder-vite/src/optimizeDeps.ts +++ b/code/builders/builder-vite/src/optimizeDeps.ts @@ -36,6 +36,7 @@ const INCLUDE_CANDIDATES = [ '@storybook/blocks', '@storybook/components', '@storybook/experimental-addon-test/preview', + '@storybook/experimental-nextjs-vite/dist/preview.mjs', '@storybook/html', '@storybook/html/dist/entry-preview-docs.mjs', '@storybook/html/dist/entry-preview.mjs', @@ -45,6 +46,7 @@ const INCLUDE_CANDIDATES = [ '@storybook/react > acorn-jsx', '@storybook/react', '@storybook/react/dist/entry-preview-docs.mjs', + '@storybook/react/dist/entry-preview-rsc.mjs', '@storybook/react/dist/entry-preview.mjs', '@storybook/svelte', '@storybook/svelte/dist/entry-preview-docs.mjs', @@ -113,6 +115,7 @@ const INCLUDE_CANDIDATES = [ 'lodash/upperFirst.js', 'lodash/upperFirst', 'memoizerific', + 'mockdate', 'msw-storybook-addon', 'overlayscrollbars', 'polished', @@ -141,6 +144,8 @@ const INCLUDE_CANDIDATES = [ 'refractor/lang/typescript.js', 'refractor/lang/yaml.js', 'regenerator-runtime/runtime.js', + 'sb-original/default-loader', + 'sb-original/image-context', 'slash', 'store2', 'storybook/internal/preview/runtime',