Registry / devops / unplugin-saykit

unplugin-saykit

JSON →
library0.1.0jsnpmunverified

Universal build tool plugin for SayKit i18n integration, supporting Vite, Rollup, Rolldown, Webpack, Rspack, esbuild, Farm, and Bun. Current stable version is 0.1.0. Release cadence is early-stage, infrequent. Key differentiator: single plugin that works across all major bundlers via unplugin, eliminating the need for bundler-specific i18n plugins. Configures SayKit within your build pipeline for automatic translation extraction and injection.

npm install unplugin-saykit
INSTALL
IMPORT
SIG · UNPLUGIN-SAYKIT
U
unplugin-saykit
devopsjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

saykit
import saykit from 'unplugin-saykit/vite'
import { saykit } from 'unplugin-saykit'
Default export, not named. Must use bundler-specific subpath (e.g., /vite). TypeScript types available.
saykit
import saykit from 'unplugin-saykit/rollup'
import saykit from 'unplugin-saykit'
Rollup entry point. Default export.
saykit
const { default: saykit } = require('unplugin-saykit/webpack')
const saykit = require('unplugin-saykit/webpack')
CommonJS: default export is on the `default` key. For ESM, use import.
saykit
import saykit from 'unplugin-saykit/esbuild'
import { saykit } from 'unplugin-saykit/esbuild'
esbuild entry point. Default export.

Configures SayKit plugin in Vite. Shows correct import subpath and default export usage. Minimal setup for i18n build integration.

// vite.config.ts import { defineConfig } from 'vite'; import saykit from 'unplugin-saykit/vite'; export default defineConfig({ plugins: [saykit()], }); // Then run: npx vite build // SayKit will automatically extract translations and inject them into your bundle. // For other bundlers, import from the appropriate subpath (e.g., 'unplugin-saykit/webpack').
Debug
Known issues
breakingImporting from 'unplugin-saykit' without subpath fails
fix
Use bundler-specific subpath: /vite, /rollup, /webpack, /rspack, /esbuild, /farm, or /bun.
affects: >=0.1.0
gotchaCommonJS require mis-handles default export
fix
Use: const { default: saykit } = require('unplugin-saykit/webpack');
affects: >=0.1.0
gotchaTypeScript strict mode may require explicit type annotations for plugin options
fix
Declare options type: saykit({ /* options */ }) or use satisfies operator.
affects: >=0.1.0
breakingNode.js <14 not supported due to ESM features
fix
Upgrade Node.js to version 14 or later.
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'unplugin-saykit' or its corresponding type declarations.
Missing bundler subpath in import or incorrect package name.
fix
Install the package: `pnpm add -D unplugin-saykit`, then import from a subpath like `import saykit from 'unplugin-saykit/vite'`.
saykit is not a function (or TypeError: (0 , unplugin_saykit_vite_1.default) is not a function)
Named import instead of default import when using ESM.
fix
Change `import { saykit } from '...'` to `import saykit from '...'`.
Cannot find module 'unplugin-saykit/vite'
Typo or unsupported bundler name in subpath.
fix
Use one of: /vite, /rollup, /rolldown, /webpack, /rspack, /esbuild, /farm, /bun.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
unpluginrequiredCore dependency for multi-bundler plugin interface
saykitrequiredPeer dependency; must be installed separately
Agent activity
4 hits · last 30 days
node
4
Resources
unplugin-saykit — npm install unplugin-saykit · libregistry