vite-impl-library-mode
OfficialConfigure Vite library builds with zero confusion.
AuthorOpenAEC-Foundation
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides a guided, battle-tested approach to configuring Vite library-mode builds for npm packages, ensuring correct outputs (es, cjs, umd, iife), proper peer-dependency externalization, and robust type declaration setup.
Core Features & Use Cases
- Library mode config: define
build.lib,entry,name,fileName,formats, and optionalcssFileNameto produce ESM, CJS, UMD, and IIFE bundles. - Externalization & globals: configure
rolldownOptions/rollupOptionsto externalize peer dependencies and provide global mappings for UMD builds. - Type declarations: integrate
vite-plugin-dtsto generate.d.tsfiles for TypeScript libraries and publish precise type definitions. - Exports patterns guidance: craft a robust
package.jsonexportsmap to expose modular entry points and assets like CSS. - Multiple entries & CSS: support single or multiple entry points with per-entry naming and optional CSS extraction.
Quick Start
Create a vite.config.ts that enables library mode with an entry, formats, and external handling, then run the build to generate dist assets.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: vite-impl-library-mode Download link: https://github.com/OpenAEC-Foundation/OpenAEC-Workspace-Composer/archive/main.zip#vite-impl-library-mode Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.