Skip to content

Commit

Permalink
Add ESM example
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Sep 3, 2022
1 parent 21cfa7e commit e3a6748
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/writing-a-plugin.md
Expand Up @@ -93,6 +93,12 @@ plugin.postcss = true
module.exports = plugin
```

For ESM project replace last line with:

```js
export default plugin
```

[PostCSS plugin boilerplate]: https://github.com/postcss/postcss-plugin-boilerplate/
[plugin template]: https://github.com/postcss/postcss-plugin-boilerplate/blob/main/template/index.t.js

Expand Down

0 comments on commit e3a6748

Please sign in to comment.