Don't export at all without export or export-as meta (Fix Storybook) #1143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally changed in ec63c34 for #710
The latest version of Webpack appears to behave differently than it did at the time the change was made.
Webpack's
require
shim no longer respectsenumerable: false
, which causes Storybook to see exports it shouldn't.This change forces properties to not be exported unless they explicitly have
^:export
(or^{:exportAs ""}
) metadata.I'm not sure which existing builds mentioned in @thheller's comment might be broken by this change.
If that's a concern, perhaps this change should be behind some sort of flag on the
ns
with the default behavior being the existing "export everything, but use enumerable: false" behavior.(It's really only necessary for module consumers that expect all exports to mean something specific, like Storybook.)