Registry / devops / layabox-esbuild

layabox-esbuild

JSON →
library1.3.2jsnpmunverified

A build tool that uses esbuild to incrementally build LayaBox projects, enabling near-instant browser refresh after code changes. Version 1.3.2 is the current stable release. It is distributed as a CLI tool (globally installed via npm) and provides commands to initialize config, start build server, and specify custom config files. Key differentiators: it does not compile TypeScript but uses esbuild for fast bundling, supports breakpoint debugging (VSCode or browser), and includes a built-in WebSocket tool for live reload. Compared to LayaAir's built-in compiler or webpack, it offers significantly faster rebuild times. The tool is designed specifically for LayaBox game development workflow.

npm install layabox-esbuild
INSTALL
IMPORT
SIG · LAYABOX-ESBUILD
L
layabox-esbuild
devopsjavascriptv1.3.2
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.

IConfig
export default interface IConfig { ... }
import { IConfig } from 'layabox-esbuild'
IConfig is a TypeScript interface defined in the config file, not exported from the package. It should be defined locally in layaboxEsbuildConfig.js or .ts file.

Globally install the package, initialize a config file, then start the development server with watch mode.

npm i layabox-esbuild -g # Then in project root: layabox-esbuild -i layabox-esbuild -s
layabox-esbuild --version
Debug
Known issues
gotchaMust install globally with -g flag, otherwise CLI commands won't be found.
fix
npm i layabox-esbuild -g
affects: >=1.0
gotchaConfig file path must match the -c argument; default expects layaboxEsbuildConfig.js in cwd.
fix
Ensure config file exists at specified path or run -i to generate default.
affects: >=1.0
gotchaThe tool does not compile TypeScript; it only proxies files. Make sure your browser supports ES modules or use a bundler for production.
fix
Use a separate build step for production, e.g., esbuild or webpack.
affects: >=1.0
gotchaAuto-update task time is in minutes, not seconds. Setting too low may cause high CPU usage.
fix
Set autoUpdateTaskTime to a reasonable value (default is 5).
affects: >=1.0
Errors
Common errors & fixes
command not found: layabox-esbuild
Package not installed globally or not in PATH.
fix
Run npm i layabox-esbuild -g
Error: Cannot find module './layaboxEsbuildConfig.js'
Config file missing or wrong path.
fix
Run 'layabox-esbuild -i' to generate default config, then ensure it's in the current directory.
TypeError: Cannot read properties of undefined (reading 'port')
Config object is empty or missing required fields.
fix
Check that layaboxEsbuildConfig.js exports a valid configuration object.
Upgrade
Version history
1.3.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
layabox-esbuild — npm install layabox-esbuild · libregistry