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

Removes old note about named imports in ESM #4392

Merged
merged 1 commit into from Nov 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 0 additions & 18 deletions docs/Guides/Plugins-Guide.md
Expand Up @@ -439,24 +439,6 @@ async function plugin (fastify, opts) {

export default plugin
```
__Note__: Fastify does not support named imports within an ESM context. Instead,
the `default` export is available.

```js
climba03003 marked this conversation as resolved.
Show resolved Hide resolved
// server.mjs
import Fastify from 'fastify'

const fastify = Fastify()

///...

fastify.listen({ port: 3000 }, (err, address) => {
if (err) {
fastify.log.error(err)
process.exit(1)
}
})
```

## Handle errors
<a id="handle-errors"></a>
Expand Down