mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-15 02:11:15 +08:00
d92de491bf
* exclude draft prs * add turbosnap * pnpn lock * add changeset * fix pnpm * fix storybook path * fix path * remove test logs --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
40 lines
868 B
TypeScript
40 lines
868 B
TypeScript
import type { StorybookConfig } from "@storybook/svelte-vite";
|
|
import { mergeConfig } from "vite";
|
|
import turbosnap from "vite-plugin-turbosnap";
|
|
|
|
const config: StorybookConfig = {
|
|
stories: [
|
|
"../../js/**/*.mdx",
|
|
"../../js/**/*.stories.@(js|jsx|ts|tsx|svelte|mdx)"
|
|
],
|
|
addons: [
|
|
"@storybook/addon-links",
|
|
"@storybook/addon-essentials",
|
|
"@storybook/addon-interactions",
|
|
"@storybook/addon-svelte-csf",
|
|
"@storybook/addon-a11y"
|
|
],
|
|
framework: {
|
|
name: "@storybook/svelte-vite",
|
|
options: {
|
|
builder: {
|
|
viteConfigPath: "js/storybook/vite.config.js"
|
|
}
|
|
}
|
|
},
|
|
staticDirs: ["./public"],
|
|
async viteFinal(config, { configType }) {
|
|
return mergeConfig(config, {
|
|
plugins:
|
|
configType === "PRODUCTION"
|
|
? [
|
|
turbosnap({
|
|
rootDir: `${process.cwd()}/js/storybook`
|
|
})
|
|
]
|
|
: []
|
|
});
|
|
}
|
|
};
|
|
export default config;
|