fix: exported types #23
Closed
Conversation
| resolvers: [resolver], | ||
| configureServer: reactRefreshServerPlugin, | ||
| transforms: [reactRefreshTransform] | ||
| } | ||
|
|
||
| export = plugin |
antfu
Sep 2, 2020
Suggested change
export = plugin
export default plugin
Suggested change
| export = plugin | |
| export default plugin |
pd4d10
Sep 2, 2020
Author
It would change the CommonJS API to require('vite-plugin-react').default. Is it in line with expectations?
It would change the CommonJS API to require('vite-plugin-react').default. Is it in line with expectations?
antfu
Sep 3, 2020
You are right. Dismissed
You are right. Dismissed
pd4d10
Sep 3, 2020
Author
BTW, I also think export default is better if breaking changes are accepted. (bump a major version)
BTW, I also think export default is better if breaking changes are accepted. (bump a major version)
antfu
Sep 3, 2020
Yep. Actually, if we use rollup for bundling, export default could be automatically converted to module.exports for cjs. However, as this is just a simple cjs plugin, there is no need to make things complicated for now.
Yep. Actually, if we use rollup for bundling, export default could be automatically converted to module.exports for cjs. However, as this is just a simple cjs plugin, there is no need to make things complicated for now.
|
LGTM |
|
Closes #7 |
|
Thanks for the PR - it seems I can't resolve the conflict since the PR doesn't allow me to push to it, so I did it in e2ba377. Hope you don't mind. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.