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.
Hi,
So this one is pretty interesting - currently it seems like you expect people to import
create-react-context
this way (because declaration file specifiesexport default ...
):The TypeScript compilation result is:
However, in
create-react-context
production (transpiled) version, we have:So obviously previous
create_react_context_1.default
is undefined.Two possible solutions (1) dropping the
module.exports
line (happens due to this plugin), or (2) accept this PR, and then client would import this way:Dropping
module.exports
means that clients who don't use es2015 modules would've to import this way:... and maybe it's a breaking change (although it's not documented).
I suggest to accept this PR (and keep
module.export
- PR is based on having it), as typings are broken anyway - no idea how people use it in current state.@jamiebuilds please.