0

将 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);

4

1 回答 1

0

将 babel-core 升级到 v7.0.0 为我解决了这个问题:

npm install --save babel-core@7.0.0-bridge.0
于 2018-06-13T08:29:24.963 回答