Registry / devops / esbuild-scripts

esbuild-scripts

JSON →
library0.0.7jsnpmunverified

esbuild-scripts is a CLI tool that wraps esbuild and provides a live-reloading dev server and static site build commands. It aims to eliminate repetitive configuration across projects. Current version 0.0.7 (pre-1.0, no fixed release cadence). Requires esbuild >=0.19.3 as a peer dependency. Only ESM config files are supported. Differentiator: lightweight alternative to heavier bundlers or custom scripts, with built-in live reload server.

npm install esbuild-scripts
INSTALL
IMPORT
SIG · ESBUILD-SCRIPTS
E
esbuild-scripts
devopsjavascriptv0.0.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

devConfig
export const devConfig = { host: 'localhost', port: 3000 };
module.exports = { devConfig: { host: 'localhost', port: 3000 } };
Must be ESM export; CommonJS not supported.
esbuildConfig
export const esbuildConfig = ({ isProd }) => ({ outdir: 'dist' });
export default { esbuildConfig: ({ isProd }) => ({ outdir: 'dist' }) };
Function must be named export, not default.

Demonstrates installing, creating a minimal ESM config file, and starting the dev server.

npm install --save-dev esbuild-scripts esbuild echo 'export const devConfig = { port: 3000 }; export const esbuildConfig = ({ isProd }) => ({ outdir: "dist", entryPoints: ["src/index.js"], bundle: true, minify: isProd });' > esbuild.config.mjs npx esbuild-scripts start
Debug
Known issues
breakingESM-only config files; CommonJS (require/module.exports) will not work.
fix
Convert config to ESM syntax (export const).
affects: >=0.0.1
gotchaPeer dependency esbuild must be installed separately; not bundled.
fix
Run 'npm install --save-dev esbuild' in your project.
affects: >=0.0.1
gotchaThe 'start' command requires 'outdir' in esbuildConfig; otherwise it fails.
fix
Ensure esbuildConfig returns an object with 'outdir' property.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Must use import to load ES Module: /path/to/esbuild.config.mjs
Config file uses CommonJS syntax or package.json missing 'type':'module'.
fix
Add '"type": "module"' to package.json or rename file to .mjs and use ESM syntax.
Error: Cannot find module 'esbuild'
esbuild peer dependency not installed.
fix
Run 'npm install --save-dev esbuild'.
Upgrade
Version history
0.0.7latest on npm
Audit
Dependencies
esbuildrequiredPeer dependency; the tool runs esbuild under the hood for bundling.
Agent activity
2 hits · last 30 days
node
2
Resources
esbuild-scripts — npm install esbuild-scripts · libregistry