Fix storybook
This commit is contained in:
parent
fddc8a1209
commit
d6fb0e836d
4 changed files with 38 additions and 803 deletions
|
@ -1,13 +1,20 @@
|
||||||
const svgrPlugin = require("vite-plugin-svgr");
|
const svgrPlugin = require("vite-plugin-svgr");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
|
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
|
||||||
addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
|
|
||||||
framework: "@storybook/react",
|
framework: "@storybook/react",
|
||||||
core: {
|
core: {
|
||||||
builder: "storybook-builder-vite",
|
builder: "storybook-builder-vite",
|
||||||
},
|
},
|
||||||
async viteFinal(config) {
|
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());
|
config.plugins.push(svgrPlugin());
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,9 +44,6 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.16.5",
|
"@babel/core": "^7.16.5",
|
||||||
"@storybook/addon-actions": "^6.5.0-alpha.5",
|
|
||||||
"@storybook/addon-essentials": "^6.5.0-alpha.5",
|
|
||||||
"@storybook/addon-links": "^6.5.0-alpha.5",
|
|
||||||
"@storybook/react": "^6.5.0-alpha.5",
|
"@storybook/react": "^6.5.0-alpha.5",
|
||||||
"babel-loader": "^8.2.3",
|
"babel-loader": "^8.2.3",
|
||||||
"sass": "^1.42.1",
|
"sass": "^1.42.1",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { GridLayoutMenu } from "./GridLayoutMenu";
|
import { GridLayoutMenu } from "./room/GridLayoutMenu";
|
||||||
import {
|
import {
|
||||||
Header,
|
Header,
|
||||||
HeaderLogo,
|
HeaderLogo,
|
||||||
|
|
Loading…
Reference in a new issue