-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Something in Storybook's default Babel config causes ReferenceError (tdz) errors #10250
Comments
Can you create a minimal repro? |
@shilman Sorry, I haven't had time to put one together yet. Until I have time to create a full repro, I suspect this is due to |
After patching Storybook's Webpack config for I couldn't find an exact issue in the Babel repo that relates directly to what I encountered, but the plugin seems to have a history of being buggy, e.g.: facebook/create-react-app#553 The closest I could find was babel/babel#4419 which seems to have a PR, but that PR hasn't been shipped as far as I can tell (and isn't referenced from any release notes I checked). |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
@shilman So what exactly is the reason why Storybook includes |
@vdh i'm not sure, but maybe @ndelangen knows |
Let's remove the plugin! Would anyone be able to open a PR removing it? |
the plugin was removed in #11086 |
With some Typescript code like this example:
Will get compiled normally by Babel into:
But under the default Storybook babel setup, gets compiled into:
And creates a
ReferenceError
error because theReact.createElement
call is moved higher than thelet
, so it's trying to usecards
too early.But I can't figure out how to debug this to find out which Babel plugin or config is doing this broken
var
/let
interaction.The text was updated successfully, but these errors were encountered: