Registry / devops / vite-plugin-yalc

vite-plugin-yalc

JSON →
library0.1.3jsnpmunverified

A Vite plugin for library projects using yalc for local package development. Version 0.1.3 is the latest stable release, updated occasionally. It hooks into Vite's build process to automatically push the built library to the yalc store after each build. Unlike manual yalc push, it integrates seamlessly into the Vite dev workflow. Provides two main exports: `runYalc` for automatic push after build, and `runCommand` for executing arbitrary scripts before pushing. Requires yalc globally installed.

npm install vite-plugin-yalc
INSTALL
IMPORT
SIG · VITE-PLUGIN-YALC
V
vite-plugin-yalc
devopsjavascriptv0.1.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

runYalc
import { runYalc } from 'vite-plugin-yalc'
import runYalc from 'vite-plugin-yalc'
Named export, not default.
runCommand
import { runCommand } from 'vite-plugin-yalc'
const runCommand = require('vite-plugin-yalc')
ESM-only; no CommonJS support.

Integrates yalc push into Vite build, automatically pushing library to local yalc store.

// vite.config.ts import { defineConfig } from 'vite'; import { runYalc } from 'vite-plugin-yalc'; export default defineConfig({ build: { lib: { entry: 'src/index.ts', name: 'MyLib', formats: ['es', 'cjs'], }, }, plugins: [runYalc()], });
Debug
Known issues
gotchayalc must be installed globally (`npm i -g yalc`) before using this plugin, otherwise the build will fail.
fix
Run `npm i -g yalc` prior to using the plugin.
affects: all
deprecatedThe `runCommand` export may be removed in a future version in favor of custom scripts.
fix
Use Vite's own `rollupOptions` hooks or pre-build scripts instead.
affects: <=0.1.3
Errors
Common errors & fixes
Cannot find module 'vite-plugin-yalc'
Plugin not installed as dev dependency.
fix
Run `npm install vite-plugin-yalc --save-dev`.
Error: yalc command not found. Please install yalc globally.
yalc is not installed globally.
fix
Run `npm install -g yalc`.
Upgrade
Version history
0.1.3latest on npm
Audit
Dependencies
yalcrequiredyalc must be installed globally for the plugin to work.
Agent activity
8 hits · last 30 days
node
8
Resources
vite-plugin-yalc — npm install vite-plugin-yalc · libregistry