esbuild-serve

Serve with live reload for esbuild.

Usage no npm install needed!

<script type="module">
  import esbuildServe from 'https://cdn.skypack.dev/esbuild-serve';
</script>

README

esbuild-serve

Serve with live reload for esbuild.


Simple esbuild wrapper

Serves your static site

With live reload

Using esbuild's watch

And a single dependency


Install

npm install esbuild-serve -D

Use

esbuild.config.js

import esbuildServe from 'esbuild-serve';

esbuildServe(
    {
        // esbuild options
    },
    {
        // serve options (optional)
        port: 7000,
        root: '.'
    }
);

package.json

{
    "type": "module",
    "scripts": {
        "start": "node esbuild.config.js -w",
        "build": "node esbuild.config.js"
    }
}

Includes

Serve 🍛   →   Ultralight http server with live reload.


Check

esbuild-plugin-pipe   →   Pipe esbuild plugins output.

esbuild-plugin-babel   →   Babel plugin for esbuild.

esbuild-plugin-postcss-literal   →   PostCSS tagged template literals plugin for esbuild.