Publishing an npm package with Vite library mode
Use Vite build.lib to bundle a library entry point, externalize dependencies, and wire up package.json exports for npm consumers.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use Vite build.lib to bundle a library entry point, externalize dependencies, and wire up package.json exports for npm consumers.
Decide whether to ship ESM, CJS, UMD, or a combination from Vite library mode, see the trade-offs in a compact table, and follow a concrete build-and-validation workflow.