{"id":25859,"library":"layabox-esbuild","title":"layabox-esbuild","description":"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.","status":"active","version":"1.3.2","language":"javascript","source_language":"en","source_url":"https://github.com/yayaluoya/layaBoxEsBuild","tags":["javascript"],"install":[{"cmd":"npm install layabox-esbuild","lang":"bash","label":"npm"},{"cmd":"yarn add layabox-esbuild","lang":"bash","label":"yarn"},{"cmd":"pnpm add layabox-esbuild","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"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.","wrong":"import { IConfig } from 'layabox-esbuild'","symbol":"IConfig","correct":"export default interface IConfig { ... }"}],"quickstart":{"code":"npm i layabox-esbuild -g\n# Then in project root:\nlayabox-esbuild -i\nlayabox-esbuild -s","lang":"javascript","description":"Globally install the package, initialize a config file, then start the development server with watch mode."},"warnings":[{"fix":"npm i layabox-esbuild -g","message":"Must install globally with -g flag, otherwise CLI commands won't be found.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Ensure config file exists at specified path or run -i to generate default.","message":"Config file path must match the -c argument; default expects layaboxEsbuildConfig.js in cwd.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use a separate build step for production, e.g., esbuild or webpack.","message":"The tool does not compile TypeScript; it only proxies files. Make sure your browser supports ES modules or use a bundler for production.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Set autoUpdateTaskTime to a reasonable value (default is 5).","message":"Auto-update task time is in minutes, not seconds. Setting too low may cause high CPU usage.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm i layabox-esbuild -g","cause":"Package not installed globally or not in PATH.","error":"command not found: layabox-esbuild"},{"fix":"Run 'layabox-esbuild -i' to generate default config, then ensure it's in the current directory.","cause":"Config file missing or wrong path.","error":"Error: Cannot find module './layaboxEsbuildConfig.js'"},{"fix":"Check that layaboxEsbuildConfig.js exports a valid configuration object.","cause":"Config object is empty or missing required fields.","error":"TypeError: Cannot read properties of undefined (reading 'port')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}