Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

babel conflict running storybook

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?

like image 395
sinnerwithguts Avatar asked Jun 06 '20 17:06

sinnerwithguts


Video Answer


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',
    ],
like image 120
sinnerwithguts Avatar answered Nov 25 '22 01:11

sinnerwithguts