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

refactor(react): update wildcard exports #5220

Merged

Conversation

joshblack
Copy link
Contributor

Updates how we use export ns from to fix our deployed storybook in production. While debugging, I discovered that the ordering of the import/export matter. Specifically:

// This would fail
import foo from './foo';
export * as ns from 'ns';

// Generated
exports.ns = exports.default = void 0;
exports.ns = _ns; // _ns is undefined in this position
var _ns = ...; 

Updating this order to the following would address this issue:

export * as ns from 'ns';
import foo from './foo';

I'm still unsure as to why but figured we could address the issue first and then figure out what's going on.

Changelog

New

Changed

  • Move export ns from statements to top of import block

Removed

@joshblack joshblack requested a review from a team as a code owner January 30, 2020 19:23
@ghost ghost requested review from abbeyhrt and asudoh January 30, 2020 19:23
@netlify
Copy link

netlify bot commented Jan 30, 2020

Deploy preview for the-carbon-components ready!

Built with commit 98d3797

https://deploy-preview-5220--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Jan 30, 2020

Deploy preview for carbon-components-react ready!

Built with commit 98d3797

https://deploy-preview-5220--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Jan 30, 2020

Deploy preview for carbon-elements ready!

Built with commit 98d3797

https://deploy-preview-5220--carbon-elements.netlify.com

Copy link
Contributor

@abbeyhrt abbeyhrt left a comment

Choose a reason for hiding this comment

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

Wooo! Storybook deploys are back 🎉

Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

👍 ✅

@tw15egan tw15egan merged commit 0000bb2 into carbon-design-system:master Jan 31, 2020
This was referenced Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants