- Home
- Skills
- Lizychy0329
- Starter Skills
- Vite Lib Vue Pnpm Starter Skill
vite-lib-vue-pnpm-starter-skill_skill
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill lizychy0329/starter-skills --skill vite-lib-vue-pnpm-starter-skill- SKILL.md4.5 KB
Overview
This skill creates a minimal Vite + Vue 3 library starter using pnpm workspaces and TypeScript. It generates all required files directly, producing a ready-to-build component library and an isolated playground for local testing. The template keeps configuration minimal and enforces pnpm as the package manager.
How this skill works
The skill scaffolds a monorepo layout with a root package, pnpm-workspace.yaml, library source, and a playground app. It writes Vite, TypeScript, and build configs (including vite-plugin-dts), a sample Counter.vue component, and scripts that run vue-tsc and build outputs. After pnpm install, you can run build and start the playground to validate outputs and dev experience.
When to use it
- Bootstrapping a new Vue 3 component library with TypeScript
- Setting up a lightweight monorepo using pnpm workspaces
- Needing a local playground that references the library via workspace:*
- Preferring Vue as an external dependency to avoid bundling
- Wanting generated type declarations and minimal config
Best practices
- Keep Vue listed as external in the library build to prevent duplicate bundling
- Use workspace:* in the playground package.json for immediate local changes
- Run vue-tsc -b before building to catch type issues early
- Enable TypeScript project references for faster and reliable compilation
- Keep configuration minimal and document scripts for common tasks
Example use cases
- Create a small, reusable component library to publish to a registry
- Prototype UI components in the playground while developing the library
- Onboard new contributors with a consistent pnpm workspace setup
- Produce ESM/UMD bundles and .d.ts files for consumers
- Switch an existing single-package project into a pnpm monorepo
FAQ
pnpm offers faster installs, stricter dependency hoisting, and superior monorepo workspace behavior which improves local development and CI reproducibility.
Is Vue bundled into the library output?
No. Vue is externalized in the build to avoid duplicate bundling and to let consumers manage the Vue version.
How do I validate the scaffolded project?
Run pnpm install, pnpm build at the root to produce dist/, and cd playground && pnpm dev to confirm the development server and TypeScript checks succeed.