-
-
Notifications
You must be signed in to change notification settings - Fork 601
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
feat(node-resolve): Add default export #361
feat(node-resolve): Add default export #361
Conversation
81be79b
to
ce8fed8
Compare
Do you mean "Add named export"? |
We've switched to named exports already here, this adds back an export named "default". |
packages/alias/README.md
Outdated
@@ -140,9 +140,9 @@ Example: | |||
```javascript | |||
// rollup.config.js | |||
import alias from '@rollup/plugin-alias'; | |||
import resolve from '@rollup/plugin-node-resolve'; | |||
import { nodeResolve } from '@rollup/plugin-node-resolve'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep this scoped to node-resolve for now, and update the plugins individually. we'll want to do a patch release for each so the docs on npm match the repo. for that we need individual commits for each plugin to keep the changelogs and publishing automation correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll revert these doc changes since the path forward should allow us to keep the same import format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome
ce8fed8
to
e99441a
Compare
# By Tiger Oakes (2) and others # Via GitHub * master: feat(wasm): Switch to TypeScript & named exports (rollup#363) feat(node-resolve): Add default export (rollup#361) fix (sucrase): resolve directory imports (rollup#390) docs(typescript): update readme examples (rollup#391) # Conflicts: # packages/sucrase/test/snapshots/test.js.md # packages/sucrase/test/snapshots/test.js.snap # packages/sucrase/test/test.js # pnpm-lock.yaml
BREAKING CHANGES: - Corrects TypeScript interface name - Adds default export
Rollup Plugin Name:
node-resolve
This PR contains:
Are tests included?
Breaking Changes?
If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers:
Description
Building on #301, this updates the documentation but also re-adds a default export. When the plugin is used with ES modules, the previous change is no longer a breaking change. However, CommonJS modules still must switch to named exports.
For consistency we should always used named exports in the documentation, but this helps users migrate to the new format.