All Projects → unjs → mkdist

unjs / mkdist

Licence: MIT License
Lightweight file-to-file transpiler.

Programming Languages

typescript
32286 projects
Vue
7211 projects
javascript
184084 projects - #8 most used programming language

mkdist

npm version npm downloads Github Actions Codecov

Lightweight file-to-file transformer

Copies all assets

Supports Vue Single File Components

Fast and minimal transform by esbuild

.d.ts generation for .ts, .js and .vue files

Why?

Bundling libraries isn't always the best choice:

  • We lose original file structure
  • We lose modern syntax by transpiling in bundle
  • We lose critical-css by extracting css to a global dist (vue)
  • Dependencies will be always imported from bundle even if not used (a second bundling step might fix this but it usually won't happen in development and for dependencies with side-effects)

While there are tools like tsc and @babel/cli, they mostly focus on transpiling rather than keeping source level quality. Also they lack support for handling custom extensions like .vue and copying assets.

🚀 Usage

npx mkdist [rootDir] [--src=src] [--dist=dist] [--pattern=glob] [--format=cjs|esm] [-d|--declaration] [--ext=mjs|js|ts]

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].