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.
pnpm add -D babel-plugin-saykit{
"plugins": ["saykit"]
}export default {
plugins: ['saykit'],
};The plugin rewrites macros. For Next.js and Metro, wrap the config with withSayKit, which compiles catalogues to ordinary .js modules before anything is bundled and recompiles them in dev:
import { withSayKit } from 'babel-plugin-saykit/next';
export default withSayKit({});const { withSayKit } = require('babel-plugin-saykit/metro');
module.exports = withSayKit(getDefaultConfig(__dirname));With plain Babel, run saykit compile before building.