Plugin Conventions
To have a better community and ecosystem, we encourage plugin authors to follow these conventions when creating unplugins.
- Plugins powered by Unplugin should have a clear name with
unplugin-
prefix. - Include
unplugin
keyword inpackage.json
. - To provide better DX, packages could export 2 kinds of entry points:
Default export: the returned value of
createUnplugin
functiontsimport UnpluginFeature from 'unplugin-feature'
Subpath exports: properties of the returned value of
createUnplugin
function for each bundler userstsimport VitePlugin from 'unplugin-feature/vite'
Refer to unplugin-starter for more details about this setup.