{"repo":"jasonsturges/vite-typescript-npm-package","free":true,"listed":false,"github":"https://github.com/jasonsturges/vite-typescript-npm-package","clone":"git clone https://github.com/jasonsturges/vite-typescript-npm-package.git","description":"Vite TypeScript library npm package template","language":"TypeScript","stars":99,"topics":["boilerplate","library","npm","package","template","vite","typescript"],"license":null,"category":"saas-starters-boilerplates","readme_excerpt":"Vite TypeScript NPM Package Scaffold TypeScript npm packages using this template to bootstrap your next library. Built with Vite for fast builds and development with HMR, plus vite-plugin-dts for bundled type definitions. [!TIP] Looking for alternatives to this Vite-based template? - JavaScript version - tsup version - ESBuild version Getting Started Use this template via GitHub's \"Use this template\" button or: Important : Check package name availability before you start to avoid renaming later: Usage The following tasks are available: - npm run build - Build production distributable (JS + types) - npm run dev - Watch mode to detect changes (rebuilds dist/ and types) - npm start - Vite dev server with HMR for local development Output Formats This template builds multiple distribution formats: - ESM ( dist/index.mjs ) - Modern ES modules for import - CommonJS ( dist/index.cjs ) - Node.js compatibility for require() - IIFE ( dist/index.iife.js ) - Browser global variable for CDN usage - Types ( dist/index.d.ts ) - Bundled TypeScript declaration file [!NOTE] Need UMD format? Add \"umd\" to the formats array in vite.config.ts and update the fileName function to handle it. Exports Export everything from the top-level index.ts for inclusion in the build. For example, if you have a utils/ folder with an arrayUtils.ts file: Include that export in the top-level index.ts : Development Multiple strategies for development are available. Local Development with HMR Vite's dev server provides","default_branch":null,"files":null,"tree":[],"storefront":"/r/jasonsturges","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jasonsturges/vite-typescript-npm-package/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}