🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

mkdist

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mkdist

Lightweight file-to-file transformer

Source
npmnpm
Version
2.3.0
Version published
Weekly downloads
214K
11.3%
Maintainers
2
Weekly downloads
 
Created
Source

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

âś… Support postcss (autoprefixer, cssnano and postcss-nested enabled out of the box!)

âť“ 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] [--no-clean] [--pattern=glob [--pattern=more-glob]] [--format=cjs|esm] [-d|--declaration] [--ext=mjs|js|ts]

License

MIT

FAQs

Package last updated on 04 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts