element-call-Github/.storybook/main.js
2022-01-21 15:42:21 -08:00

22 lines
497 B
JavaScript

const svgrPlugin = require("vite-plugin-svgr");
module.exports = {
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
framework: "@storybook/react",
core: {
builder: "storybook-builder-vite",
},
async viteFinal(config) {
config.plugins = config.plugins.filter(
(item) =>
!(
Array.isArray(item) &&
item.length > 0 &&
item[0].name === "vite-plugin-mdx"
)
);
config.plugins.push(svgrPlugin());
return config;
},
};