Serve with live reload for esbuild.
npm install esbuild-serve -D
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"
}
}
esbuild → Extremely fast bundler and minifier.
Serve 🍛 → Ultralight http server with live reload.
esbuild-plugin-pipe → Pipe esbuild plugins output.
esbuild-plugin-babel → Babel plugin for esbuild.
esbuild-plugin-svg → Svg files import plugin for esbuild.
esbuild-plugin-postcss-literal → PostCSS tagged template literals plugin for esbuild.