esbuild-live-server
v1.0.7
Published
A development server with live reload enabled, allows you to see updates to your file changes in realtime
Downloads
19
Maintainers
Readme
Esbuild-live-server
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