babel-plugin-saykit
v0.11.0
Published
Babel plugin for SayKit
Maintainers
Readme
babel-plugin-saykit
Babel plugin for SayKit.
Use this for Next.js (.babelrc), React Native, Expo, Metro, or any Babel-driven pipeline. For Vite, Rollup, Webpack, esbuild, and similar bundlers, use unplugin-saykit instead.
Install
pnpm add -D babel-plugin-saykitUsage
{
"plugins": ["saykit"]
}export default {
plugins: ['saykit'],
};Catalogues
By default the plugin inlines each imported catalogue into the module that imports it, which works anywhere Babel runs but does not hot-reload. Under Next.js or Metro, set catalogues: 'module' and let the bundler serve catalogues as real modules:
{
"presets": ["next/babel"],
"plugins": [["saykit", { "catalogues": "module" }]]
}import { withSayKit } from 'babel-plugin-saykit/next';
export default withSayKit({
// your config
});For Metro, use withSayKit from babel-plugin-saykit/metro in metro.config.js instead.
