Skip to content

A development server with live reload enabled, allows you to see updates to your file changes in realtime

License

Notifications You must be signed in to change notification settings

ojolowoblue/esbuild-live-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A development server with live reload enabled, allows you to see updates to your file changes in realtime

Features

  • Minimal but efficient
  • Watches for file changes (Chokidar) and updates in real time
  • Live reload
  • Fast build with Esbuild (Like flash 🏃🏾‍♂️)
  • Uses a lightweight server, no overheads - create-serve

Get Started

Install with npm

npm install esbuild-live-server -D

Then import and use it in your code

build.config.js

import EsbuildServer from "esbuild-live-server"

   // takes in two params, esbuild config and server config
    EsbuildServer({
        // ESBuild Config
    }, {
        // Server Config
        port: 4000,
        root: "./public", // path to the folder you want to serve
    });

Run Scripts

command line

    node build.config.js --watch
    # or
    node build.config.js -w

package.json

    {
        "scripts": {
            "dev": "node esbuild.config.js -w",
        }
    }

Then run

    yarn dev 
    # or
    npm run dev

Example Project that implements this package

   https://github.com/ojolowoblue/react-app-minifier

Thank You

About

A development server with live reload enabled, allows you to see updates to your file changes in realtime

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published