reactjs - React Storybook Fails on Demo -




i'm attempting use react storybook in project has extensive webpack 2 config. started storybook following basic steps:

npm -g @storybook/cli

getstorybook

when run yarn storybook, breaks on jsx of demo component:

error in ./stories/index.jsx module parse failed: /users/alexanderhadik/project/web/node_modules/@storybook/react/node_modules/babel-loader/lib/index.js??ref--0!/users/alexanderhadik/project/web/stories/index.jsx unexpected token (9:55) may need appropriate loader handle file type. | import { button, welcome } '@storybook/react/demo'; |  | storiesof('welcome', module).add('to storybook', () => <welcome showapp={linkto('button')} />); |  | storiesof('button', module)  @ ./.storybook/config.js 4:2-23  @ multi ./node_modules/@storybook/react/dist/server/config/polyfills.js ./node_modules/@storybook/react/dist/server/config/globals.js ./node_modules/webpack-hot-middleware/client.js?reload=true ./.storybook/config.js 

since didn't start project using create-react-app - need modify storybook webpack config enable jsx?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -