Skip to content
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

[Bug]: sb babelrc produces empty config #20220

Closed
shilman opened this issue Dec 13, 2022 · 3 comments
Closed

[Bug]: sb babelrc produces empty config #20220

shilman opened this issue Dec 13, 2022 · 3 comments

Comments

@shilman
Copy link
Member

shilman commented Dec 13, 2022

Describe the bug

Users of SB6 migrating to SB7 who don't have a babelrc should be able to run:

npx sb babelrc

This should create a .babelrc.json that provides a legacy v6 babel configuration. Instead it prodcues:

{
  "sourceType": "unambiguous",
  "presets": [],
  "plugins": []
}

To Reproduce

No response

System

No response

Additional context

No response

@shilman shilman moved this to Required for beta announcement in Core Team Projects Dec 13, 2022
@shilman shilman added the linear label Dec 13, 2022
@ndelangen ndelangen moved this from Required for beta announcement to In Progress in Core Team Projects Dec 13, 2022
@ndelangen
Copy link
Member

Code is generated here:

const contents = JSON.stringify(
{
sourceType: 'unambiguous',
presets: [],
plugins: [],
},
null,
2
);

@ndelangen
Copy link
Member

I can't generate it with comments because of the .json extension. And even if that could support comments, I'd need to switch to some other form of code-generation; because JSON.stringify can't do it.

@shilman
Copy link
Member Author

shilman commented Dec 15, 2022

Yo-ho-ho!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.9 containing PR #20234 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Dec 15, 2022
Repository owner moved this from In Progress to Done in Core Team Projects Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants