# @michijs/dev-server

> Development server based on esbuild

Latest version **0.8.39** (published 2026-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @michijs/dev-server
pnpm add @michijs/dev-server
yarn add @michijs/dev-server
bun add @michijs/dev-server
```

Provides the command `michi-server`.

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.8.39 |
| Published | 2026-10-08 |
| First published | 2023-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=14.16 |
| Dependencies | 9 |
| Unpacked size | 68 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | lsegurado |
| Keywords | react, javascript, css, bundler, typescript, compiler, jsx, commonjs, minifier, tsx, esm, server, development |

## Links

- npm: https://www.npmjs.com/package/@michijs/dev-server
- Repository: https://github.com/michijs/dev-server
- npm.io page: https://npm.io/package/@michijs/dev-server

## Dependencies (9)

- [open](https://npm.io/package/open.md) 11.0.4
- [sharp](https://npm.io/package/sharp.md) 0.35.5
- [yargs](https://npm.io/package/yargs.md) 18.2.0
- [esbuild](https://npm.io/package/esbuild.md) 0.28.2
- [colorthief](https://npm.io/package/colorthief.md) 3.5.0
- [node-watch](https://npm.io/package/node-watch.md) 0.7.4
- [@types/chrome](https://npm.io/package/@types/chrome.md) ^0.3.4
- [playwright-core](https://npm.io/package/playwright-core.md) 1.63.0
- [@types/web-app-manifest](https://npm.io/package/@types/web-app-manifest.md) 1.0.9

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.8.39 (latest) — 2026-10-08
- 0.8.30-beta.8 (beta) — 2026-05-18
- 0.8.38 — 2026-09-15
- 0.8.37 — 2026-09-08
- 0.8.36 — 2026-08-29
- 0.8.35 — 2026-08-29
- 0.8.34 — 2026-08-12
- 0.8.33 — 2026-07-13
- 0.8.32 — 2026-05-21
- 0.8.30-beta.7 — 2026-05-17
- 0.8.30-beta.6 — 2026-05-17
- 0.8.30 — 2026-05-15
- 0.8.30-beta.5 — 2026-05-06
- 0.8.30-beta.4 — 2026-05-06
- 0.8.30-beta.3 — 2026-05-06
- … 132 more at https://npm.io/package/@michijs/dev-server/versions

## README

# Michijs Dev Server
Development server built on top of esbuild.
<!-- TODO: To generate feature-image require to install roboto -->

![npm][version] [![license][github-license]][github-license-url] ![npm][npm-downloads] ![npm][repo-size]

## Main features
- Configure esbuild options with Typescript
- First-class PWA support
- Custom environments
- Packages distribution

## Getting started

You can use the following [test project](https://github.com/michijs/michijs-template) or setup a project from scratch:

    npm install -D @michijs/dev-server

## CLI commands
You have the following CLI commands:
<table>
  <thead>
    <tr>
      <th>CLI command</th>
      <th>Default environment</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>start</td>
      <td>DEVELOPMENT</td>
      <td>Allows to start a dev server as a webpage.</td>
    </tr>
    <tr>
      <td>build</td>
      <td>PRODUCTION</td>
      <td>Allows to build the src code as a webpage.</td>
    </tr>
    <tr>
      <td>dist</td>
      <td>DISTRIBUTION</td>
      <td>Allows to distribute the src code as a package. At the moment ESBuild does not support .d.ts files so we still use the Typescript compiler with the tsconfig provided by esbuildOptions field.</td>
    </tr>
    <tr>
      <td>generate-icons</td>
      <td>-</td>
      <td>Allows to generate a full set of icons (including favicon and maskable variants) from a src icon.</td>
    </tr>
    <tr>
      <td>generate-feature-image</td>
      <td>-</td>
      <td>Allows to generate the feature image from a src icon (requires running the dev server).</td>
    </tr>
    <tr>
      <td>generate-screenshots</td>
      <td>-</td>
      <td>Allows to generate the configured screenshots from the running app.</td>
    </tr>
  </tbody>
</table>


## Configure the server
To configure the server you just need to create an optional file called michi.config.ts at the root of your project. This file would look like this:

```ts
import { ServerConfig, ServerConfigFactory, DefaultEnvironment } from '@michijs/server';

export const config: ServerConfigFactory = (environment) => {
  const defaultConfig: ServerConfig = {
    // Your custom configuration
  }
  return defaultConfig;
};

export default config;
```

<table>
  <thead>
    <tr>
      <th colspan="4">ServerConfig</th>
      <th>Default value</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>env</td>
      <td colspan="3">Allows to add environment variables</td>
      <td></td>
    </tr>
    <tr>
      <td>esbuildOptions</td>
      <td colspan="3">All the options available at <a href="https://esbuild.github.io/plugins/#build-options">esbuild documentation</a></td>
      <td>Can be chequed <a href="#esbuild-default-options">here</a></td>
    </tr>
    <tr>
      <td>openBrowser</td>
      <td colspan="3">If the browser should open at localhost url when server starts</td>
      <td>"true"</td>
    </tr>
    <tr>
      <td>watch</td>
      <td colspan="3">If the server should watch for changes on the folders</td>
      <td>"true"</td>
    </tr>
    <tr>
      <td>port</td>
      <td colspan="3">Port to run dev server on</td>
      <td>"3000"</td>
    </tr>
    <tr>
      <td rowspan="14">public</td>
      <td rowspan="14">Public folder - will be copied at server start</td>
      <tr>
        <td rowspan="4">assets</td>
        <tr>
          <td>path</td>
          <td>"assets"</td>
        </tr>
        <tr>
          <td>screenshots</td>
          <td></td>
        </tr>
        <tr>
          <td>featureImage</td>
          <td></td>
        </tr>
      </tr>
      <tr>
        <td colspan="2">indexName</td>
        <td>"index.html"</td>
      </tr>
      <tr>
        <td colspan="2">minify</td>
        <td>"true" if environment is PRODUCTION</td>
      </tr>
      <tr>
        <td colspan="2">path</td>
        <td>"public"</td>
      </tr>
      <tr>
        <td rowspan="3">manifest <br/><small>(A JSON document that contains startup parameters and application defaults for when a web application is launched.)</small></td>
        <tr>
          <td>name</td>
          <td>"manifest.json"</td>
        </tr>
        <tr>
          <td>options</td>
          <td></td>
        </tr>
      </tr>
      <tr>
        <td rowspan="3">wellKnown <br/><small>(A URI with the path component /.well-known/assetlinks.json is used by the AssetLinks protocol to identify one or more digital assets (such as web sites or mobile apps) that are related to the hosting web site in some fashion.)</small></td>
        <tr>
          <td>relation</td>
          <td></td>
        </tr>
        <tr>
          <td>target</td>
          <td></td>
        </tr>
      </tr>
    </tr>
  </tbody>
</table>

## Esbuild default options

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Default value</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>bundle</td>
      <td>"true"</td>
    </tr>
    <tr>
      <td>entryPoints</td>
      <td>['src/index.ts']</td>
    </tr>
    <tr>
      <td>format</td>
      <td>"esm"</td>
    </tr>
    <tr>
      <td>keepNames</td>
      <td>"true" if environment is PRODUCTION</td>
    </tr>
    <tr>
      <td>logLevel</td>
      <td>"error"</td>
    </tr>
    <tr>
      <td>minifySyntax</td>
      <td>"true" if environment is PRODUCTION</td>
    </tr>
    <tr>
      <td>minifyWhitespace</td>
      <td>"true" if environment is PRODUCTION</td>
    </tr>
    <tr>
      <td>outdir</td>
      <td>"build"</td>
    </tr>
    <tr>
      <td>sourcemap</td>
      <td>"true" if environment is <b>NOT</b> PRODUCTION</td>
    </tr>
    <tr>
      <td>splitting</td>
      <td>"true"</td>
    </tr>
    <tr>
      <td>target</td>
      <td>"esnext"</td>
    </tr>
    <tr>
      <td>tsconfig</td>
      <td>"tsconfig.json"</td>
    </tr>
  </tbody>
</table>

## License
 - [MIT](https://github.com/michijs/dev-server/blob/master/LICENSE.md)

[repo-size]: https://img.shields.io/github/repo-size/michijs/dev-server
[npm-downloads]: https://img.shields.io/npm/dt/@michijs/dev-server
[version]: https://img.shields.io/npm/v/@michijs/dev-server
[github-license]: https://img.shields.io/github/license/michijs/dev-server
[github-license-url]: https://github.com/michijs/dev-server/blob/master/LICENSE.md

---
_Source: https://npm.io/package/@michijs/dev-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
