{"id":25988,"library":"ngc-esbuild","title":"ngc-esbuild","description":"An experimental Angular compiler leveraging esbuild for ultra-fast builds, claiming 50x faster than ng build. Current version 0.0.83 (alpha). Release cadence is irregular with frequent updates. Maintained by the community (cherryApp). Supports SCSS, loadChildren, and partial Angular features like templateUrl and angular.json styles/scripts, but many limitations exist (e.g., only one styleUrls). For developers willing to trade off completeness for speed in early-stage projects.","status":"active","version":"0.0.83","language":"javascript","source_language":"en","source_url":"https://github.com/cherryApp/ngc-esbuild","tags":["javascript","angular","esbuild","fast","building","applications"],"install":[{"cmd":"npm install ngc-esbuild","lang":"bash","label":"npm"},{"cmd":"yarn add ngc-esbuild","lang":"bash","label":"yarn"},{"cmd":"pnpm add ngc-esbuild","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package does not expose ESM exports; CommonJS require is the only option in v0.0.83.","wrong":"import NgcEsbuild from 'ngc-esbuild';","symbol":"NgcEsbuild (default)","correct":"const NgcEsbuild = require('ngc-esbuild');"},{"note":"The class must be instantiated with the 'new' keyword.","wrong":"NgcEsbuild({ port: 4200 }) // missing 'new'","symbol":"NgcEsbuild constructor options","correct":"new NgcEsbuild({ port: 4200, serve: true })"},{"note":"The 'resolve' property is a Promise, not a function.","wrong":"instance.resolve() // resolve is a property, not a method","symbol":"resolve promise","correct":"instance.resolve.then(result => console.log(result))"}],"quickstart":{"code":"const NgcEsbuild = require('ngc-esbuild');\n\nconst builder = new NgcEsbuild({\n  main: 'src/main.ts',\n  outpath: 'dist/esbuild',\n  minify: true,\n  open: false,\n  port: 9855,\n  sourcemap: true,\n  serve: true,\n});\n\nbuilder.resolve.then(\n  (result) => console.log('Build succeeded:', result)\n).catch(err => console.error('Build failed:', err));","lang":"javascript","description":"Shows CommonJS usage to instantiate NgcEsbuild with options and handle the build result promise."},"warnings":[{"fix":"Pin to a specific version and test updates thoroughly.","message":"The package is in early alpha; APIs may change without notice.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Merge multiple stylesheets into one file or use a different bundler if more are needed.","message":"Only one styleUrls entry is supported due to a limitation in internal plugin.","severity":"gotcha","affected_versions":"<=0.0.83"},{"fix":"Use builder.resolve.then() instead of builder.resolve().","message":"The 'resolve' property is a Promise, not a method. Calling it as a function will result in 'resolve is not a function' error.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Prefer 'outdir' for consistency with esbuild, but test if 'outpath' still works.","message":"The option 'outpath' is used in the quickstart, but esbuild uses 'outdir'. Check if both are supported.","severity":"deprecated","affected_versions":"<=0.0.83"},{"fix":"Use Angular CLI's default build for production-grade features; consider ngc-esbuild only for rapid prototyping.","message":"The package has limited Angular feature support: no ViewEncapsulation.Emulated, no i18n, no lazy loading via Angular Router (though loadChildren is mentioned as handled).","severity":"gotcha","affected_versions":"<=0.0.83"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'new NgcEsbuild({...})' instead of 'NgcEsbuild({...})'.","cause":"Forgetting 'new' keyword when instantiating the class.","error":"TypeError: NgcEsbuild is not a constructor"},{"fix":"Run 'npm install ngc-esbuild' and use 'const NgcEsbuild = require('ngc-esbuild');'","cause":"Package not installed or incorrect import path.","error":"Cannot find module 'ngc-esbuild'"},{"fix":"Use 'builder.resolve.then(...)' not 'builder.resolve(...)'.","cause":"Attempting to call resolve() as a method instead of accessing it as a Promise property.","error":"resolve is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}