mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
638883eef9
Fix typing of memoized TileLayout component, fix broken Vite config, upgrade Storybook to latest.
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import type { StorybookConfig } from "@storybook/react-vite";
|
|
import type { ElectronViteConfig } from "electron-vite";
|
|
import type { UserConfig } from "vite";
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ["../frontend/**/*.mdx", "../frontend/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
|
|
addons: [
|
|
"@storybook/addon-links",
|
|
"@storybook/addon-essentials",
|
|
"@chromatic-com/storybook",
|
|
"@storybook/addon-interactions",
|
|
],
|
|
|
|
core: {},
|
|
|
|
framework: {
|
|
name: "@storybook/react-vite",
|
|
options: {},
|
|
},
|
|
|
|
docs: {},
|
|
|
|
managerHead: (head) => `
|
|
${head}
|
|
<meta name="robots" content="noindex" />
|
|
`,
|
|
|
|
typescript: {
|
|
reactDocgen: "react-docgen-typescript",
|
|
},
|
|
|
|
async viteFinal(config) {
|
|
const { mergeConfig } = await import("vite");
|
|
const { tsImport } = await import("tsx/esm/api");
|
|
const electronViteConfig = (await tsImport("../electron.vite.config.ts", import.meta.url))
|
|
.default as ElectronViteConfig;
|
|
return mergeConfig(config, electronViteConfig.renderer as UserConfig);
|
|
},
|
|
};
|
|
export default config;
|