
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
esbuild-dev-server
Advanced tools
This plugin allows you to start a local server with hot reloading for Esbuild
More community plugins
npm
npm i esbuild-dev-server -D
yarn
yarn add esbuild-dev-server -D
go
go get github.com/Falldot/esbuild-dev-server
options.port
, string
: local server start port.options.index
, string
: path to index html file.options.staticDir
, string
: path to static files (js, css, img ...).options.watchDir
, string
: path to working directory.options.onBeforeRebuild
, () => void
: event before rebuild.options.onAfterRebuild
, () => void
: event after rebuild.esbuild.config.js
const {build} = require("esbuild")
const esBuildDevServer = require("esbuild-dev-server")
esBuildDevServer.start(
build({
entryPoints: ["src/index.js"],
outdir: "dist",
incremental: true,
// and more options ...
}),
{
port: "8080", // optional, default: 8080
watchDir: "src", // optional, default: "src"
index: "dist/index.html", // optional
staticDir: "dist", // optional
onBeforeRebuild: {}, // optional
onAfterRebuild: {}, // optional
}
)
package.json
"scripts": {
"dev": "node esbuild.config.js",
},
dist/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="root"></div>
<script src="index.js"></script>
</body>
</html>
esbuild.config.go
package main
import (
devserver "github.com/Falldot/esbuild-dev-server"
"github.com/evanw/esbuild/pkg/api"
)
func main() {
devserver.Start(
api.Build(api.BuildOptions{
EntryPoints: []string{"src/index.js"},
Outdir: "dist",
Incremental: true,
// and more options ...
}),
devserver.Options{
Port: "8080", // optional, default: 8080
WatchDir: "src", // optional, default: "src"
Index: "dist/index.html", // optional
StaticDir: "dist", // optional
OnBeforeRebuild: func() {}, // optional
OnAfterRebuild: func() {}, // optional
},
)
}
package.json
"scripts": {
"dev": "go esbuild.config.go",
},
FAQs
An fast JavaScript hot dev local server.
The npm package esbuild-dev-server receives a total of 18 weekly downloads. As such, esbuild-dev-server popularity was classified as not popular.
We found that esbuild-dev-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.