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

Merge pull request #9492 from storybookjs/9490-fix-source-loader-imports #9492

Merged
merged 3 commits into from
Jan 16, 2020

Conversation

shilman
Copy link
Member

@shilman shilman commented Jan 16, 2020

Issue: #9490

What I did

Always insert the preamble code at the beginning of the file. See the repro in #9490

import A1
export A2
import B1
-> (inserted code)
export B2

=>

-> (inserted code)
import A1
export A2
import B1
export B2

How to test

See new official-storybook example, which fails before the change & succeeds after

@shilman shilman added bug patch:yes Bugfix & documentation PR that need to be picked to main branch source-loader labels Jan 16, 2020
@shilman shilman added this to the 5.3.x milestone Jan 16, 2020
@vercel
Copy link

vercel bot commented Jan 16, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/b7aii4tlc
✅ Preview: https://monorepo-git-9490-fix-source-loader-imports.storybook.now.sh

@shilman shilman requested a review from usulpro as a code owner January 16, 2020 10:30
@vercel vercel bot temporarily deployed to Preview January 16, 2020 10:30 Inactive
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM based on discussion

@shilman shilman changed the title Source-loader: Add imports to top of file Merge pull request #9492 from storybookjs/9490-fix-source-loader-imports Jan 16, 2020
@shilman shilman merged commit 66c524f into next Jan 16, 2020
@shilman shilman deleted the 9490-fix-source-loader-imports branch January 16, 2020 13:48
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch source-loader
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants