Registry / web-framework / ngc-esbuild

ngc-esbuild

JSON →
library0.0.83jsnpmunverified

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.

npm install ngc-esbuild
INSTALL
IMPORT
SIG · NGC-ESBUILD
N
ngc-esbuild
web-frameworkjavascriptv0.0.83
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.

NgcEsbuild (default)
const NgcEsbuild = require('ngc-esbuild');
import NgcEsbuild from 'ngc-esbuild';
Package does not expose ESM exports; CommonJS require is the only option in v0.0.83.
NgcEsbuild constructor options
new NgcEsbuild({ port: 4200, serve: true })
NgcEsbuild({ port: 4200 }) // missing 'new'
The class must be instantiated with the 'new' keyword.
resolve promise
instance.resolve.then(result => console.log(result))
instance.resolve() // resolve is a property, not a method
The 'resolve' property is a Promise, not a function.

Shows CommonJS usage to instantiate NgcEsbuild with options and handle the build result promise.

const NgcEsbuild = require('ngc-esbuild'); const builder = new NgcEsbuild({ main: 'src/main.ts', outpath: 'dist/esbuild', minify: true, open: false, port: 9855, sourcemap: true, serve: true, }); builder.resolve.then( (result) => console.log('Build succeeded:', result) ).catch(err => console.error('Build failed:', err));
ngc-esbuild --version
Debug
Known issues
breakingThe package is in early alpha; APIs may change without notice.
fix
Pin to a specific version and test updates thoroughly.
affects: >=0.0.0
gotchaOnly one styleUrls entry is supported due to a limitation in internal plugin.
fix
Merge multiple stylesheets into one file or use a different bundler if more are needed.
affects: <=0.0.83
gotchaThe 'resolve' property is a Promise, not a method. Calling it as a function will result in 'resolve is not a function' error.
fix
Use builder.resolve.then() instead of builder.resolve().
affects: >=0.0.0
deprecatedThe option 'outpath' is used in the quickstart, but esbuild uses 'outdir'. Check if both are supported.
fix
Prefer 'outdir' for consistency with esbuild, but test if 'outpath' still works.
affects: <=0.0.83
gotchaThe package has limited Angular feature support: no ViewEncapsulation.Emulated, no i18n, no lazy loading via Angular Router (though loadChildren is mentioned as handled).
fix
Use Angular CLI's default build for production-grade features; consider ngc-esbuild only for rapid prototyping.
affects: <=0.0.83
Errors
Common errors & fixes
TypeError: NgcEsbuild is not a constructor
Forgetting 'new' keyword when instantiating the class.
fix
Use 'new NgcEsbuild({...})' instead of 'NgcEsbuild({...})'.
Cannot find module 'ngc-esbuild'
Package not installed or incorrect import path.
fix
Run 'npm install ngc-esbuild' and use 'const NgcEsbuild = require('ngc-esbuild');'
resolve is not a function
Attempting to call resolve() as a method instead of accessing it as a Promise property.
fix
Use 'builder.resolve.then(...)' not 'builder.resolve(...)'.
Upgrade
Version history
0.0.83latest on npm
Audit
Dependencies

No dependency data recorded yet.

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