将 Next.js 升级到 v6.0.3 后,我之前的工作设置停止工作。
故事书版本
> "@storybook/addon-actions": "^3.4.2",
> "@storybook/addon-storyshots": "^3.4.2",
> "@storybook/addon-viewport": "^3.4.2",
> "@storybook/react": "^3.4.2",
.stoyboojk/config.js
import { configure, addDecorator } from "@storybook/react";
import { configureViewport } from "@storybook/addon-viewport";
import { Provider } from "./Provider";
import "./main.css";
addDecorator(story => (
<div dir="rtl" className="m-2 m-md-3">
{story()}
</div>
));
addDecorator(story => <Provider story={story()} />);
function loadStories() {
//stories...
}
configure(loadStories, module);