Vue CLI Plugin for TypeScript Library Bundling

0.0.3 · abandoned · verified Wed Apr 22

This plugin offers a zero-configuration solution for bundling TypeScript libraries within Vue CLI projects. It's specifically designed to facilitate the creation of single JavaScript component files along with their corresponding TypeScript declaration files (`.d.ts`). Currently at version 0.0.3, the project appears to be abandoned, with no significant updates in several years. Its core functionality wraps `dts-bundle`, automatically configuring `webpack` to resolve conflicts that typically arise during `.d.ts` file generation with tools like `thread-loader` and `cache-loader`. This allows developers to publish Vue components as external modules, maintaining full TypeScript support without extensive build configuration, differentiating it from manual `webpack` setup or alternative bundlers.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart guides you through creating a new Vue TypeScript library project using a preset, building it, and then bundling its TypeScript declaration files into a single `.d.ts` output.

vue create --preset vatson/vue-ts-lib my-vue-lib
cd my-vue-lib
# Develop your TypeScript library components here, e.g., src/components/MyComponent.ts
# Ensure your main entry point (e.g., src/index.ts) exports components for bundling
npm install
npm run build # Compiles your library and generates individual .d.ts files
npm run bundleDts # Bundles all .d.ts files into a single declaration file
# This will typically generate a 'dist/my-vue-lib.d.ts' or similar unified declaration file.

view raw JSON →