Next.js 升级到 v6.0.3 后 Storybook 编译失败

Storybook fails to compile after upgrading Next.js to v6.0.3

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

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

npm install --save babel-core@7.0.0-bridge.0