ds-pack / babel-plugin-docs

A babel plugin for collecting documentation on components and hooks
2 stars 0 forks source link

Babel plugin entrypoint should export default a plugin function #5

Closed hamlim closed 4 years ago

hamlim commented 4 years ago

Right now, the provided config in the documentation results in babel erring out because it's not exporting a default plugin for babel to use.

The aim was to expose the plugin as one of several exports, so let's update the documentation and the code to support a new entrypoint for out of the box babel config:

New babel config:

{
  "plugins": [
    "@ds-pack/babel-plugin-docs/plugin"
  ]
}

Updated plugin file

export default function docsPlugin() { /* ... */ }