babel conflict running storybook

Viewed 6155

I've an app built with create-react-app. I've added storybook (in accordance to this manual https://storybook.js.org/docs/guides/guide-react/). When I run yarn storybook, I get this error.

'loose' mode configuration must be the same for both @babel/plugin-proposal-class-properties and @babel/plugin-proposal-private-methods

Not quite sure how to solve it. Any ideas?

1 Answers

Anybody who has the same issue, this is the best solution (from the link provided by yuriy636). Add this to babel config

plugins: [
      '@babel/plugin-proposal-class-properties',
      '@babel/plugin-proposal-private-methods',
    ],
Related