Skip to main content
Deno 2 is finally here 🎉️
Learn more

esw

github action npm (tag) node-current

esw is a JavaScript/TypeScript library build tool. It offers blazing fast performance utilizing esbuild, and requires zero configuration.

  • No more build scripts or configs. esw has supported automatic build option inference.
  • Smaller bundle size. It wouldn’t bundle any dependencies or peerDependencies by default.
  • The most of web project source file type has been supported by default, eg. TypeScript/JavaScript/JSX/CSS(experimental)

Installation

  • using npm

    npm i esw --save-dev
  • using yarn

    yarn add esw -D
  • using pnpm

    pnpm i esw -D

Getting Started

3 steps to get started:

  1. 🖊 declare main or module or both them in the package.json.

    {
      "name": "esw",
      "main": "dist/index.cjs.js",
      "module": "dist/index.esm.js"
    }

    ⚠️ The output format what module field refers to always be treated as esmwhy.

  2. 🏃‍ Run esw build from the working directory.

    esw build
  3. 🏆 All transpiled products would be placed in the target output path which were inferred by esw.

    project
     └─dist
        ├─index.cjs.js
        └─index.esm.js

Advanced Usage

esw has supported the most of esbuild cli options. e.g:

esw build --minify --sourcemap --target=es2019 --format=esm

Build codebase

esw build

Watch codebase

esw watch

Supported source file types

Please refer to esbuild documentation.

License

MIT © Liu Bowen