element-call/.storybook/main.js

26 lines
698 B
JavaScript
Raw Normal View History

2021-12-23 20:45:00 +00:00
const svgrPlugin = require("vite-plugin-svgr");
2022-01-08 00:20:55 +00:00
const path = require("path");
2021-12-23 20:45:00 +00:00
module.exports = {
2022-01-21 23:42:21 +00:00
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
2021-12-23 20:45:00 +00:00
framework: "@storybook/react",
core: {
builder: "storybook-builder-vite",
},
async viteFinal(config) {
2022-01-21 23:42:21 +00:00
config.plugins = config.plugins.filter(
(item) =>
!(
Array.isArray(item) &&
item.length > 0 &&
item[0].name === "vite-plugin-mdx"
)
);
2021-12-23 20:45:00 +00:00
config.plugins.push(svgrPlugin());
2022-01-08 00:20:55 +00:00
config.resolve = config.resolve || {};
config.resolve.dedupe = config.resolve.dedupe || [];
config.resolve.dedupe.push("react", "react-dom", "matrix-js-sdk");
2021-12-23 20:45:00 +00:00
return config;
},
};