-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Storybook with MobX and CRA #9162
Comments
You need to use the standalone preset |
sry, how to do that? Setting |
Adding Using |
cc @mrmckeb |
@SaadRegal, this is not officially supported by CRA, and we do a best-effort to support customisations like the one you're using. I think we'll be able to find a fix in this case ;) The Are you able to supply a reproducible demo for me to take a look at? Also, have you tried adding a |
Also, as we don't support If you need something more than Babel plugins (again, The CRA team recommend creating a fork of CRA for the best experience with (amazing) tools like Storybook. That's what most of the team members do (including myself). |
@mrmckeb That doesn't answer the question about what might have broken: I think getting a CRA fork working and the mobx/decorator thing are actually two separate issues. |
@mrmckeb |
I'm working on this and will test against your repo ASAP :) |
Hi @SaadRegal, I can confirm this work fine with All I did was add a module.exports = {
addons: ["@storybook/preset-create-react-app"]
}; I then saw another error, which was related to an import of a non-existent file (a Let me know how you go with this :) |
Yes, adding that to |
Having the same issue with unejected CRA, Just updated to storybok 5.3.8 and using "@storybook/preset-create-react-app", but this issue still appears... |
What has worked for me, is removing new separate "preset-create-react-app" and rely on old built-in one, althought I am getting deprication warnings it compiles everything without decorator errors |
cc @mrmckeb |
@AkhmedovValikhan are you able to provide any more information (or repro repo)? Do you have a babel config anywhere in that project? |
I had the same that I managed to solve with #6069 (comment) |
I'm having trouble running Storybook with MobX, i'm using create-react-app with react-app-rewired.
Here's my babel configuration in package.json
Storybook config .storybook/config.js
react-app-rewire configuration config-overrides.js
I get the following error when i run
yarn run storybook
:The app works fine with current config, is there any missing configuration for storybook ?
The text was updated successfully, but these errors were encountered: