marcellkiss / angular-esbuild-example Goto Github PK
View Code? Open in Web Editor NEWEsbuild Angular Example project, production build in ~200ms
Esbuild Angular Example project, production build in ~200ms
I'm using the nrwl/nx based workspace with the standalone config, so the angular.json
looks like this:
angular.json
{
"version": 2,
"projects": {
"app-1": "apps/app-1",
"api": "apps/api",
"shared": "libs/shared"
}
}
After I run the npx ngc-esbuild
I get the following error:
X [ERROR] [plugin angularAssetsResolver] Cannot read property 'build' of undefined
C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\bin\run-esbuild.js:119:71:
119 │ this.builderOptions = angularSettings.projects[project].architect[mode].options;
╵ ^
at NgEsbuild.getBuilderOptions (C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\bin\run-esbuild.js:119:72)
at async setup (C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\bin\plugin\esbuild-assets-resolver.js:11:23)
at async handlePlugins (C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\node_modules\esbuild\lib\main.js:856:11)
(node:14972) UnhandledPromiseRejectionWarning: Error: Build failed with 1 error:
C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\bin\run-esbuild.js:119:71: ERROR: [plugin: angularAssetsResolver] Cannot read property 'build' of undefined
at failureErrorWithLog (C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\node_modules\esbuild\lib\main.js:1557:15)
at C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\node_modules\esbuild\lib\main.js:1102:18
at C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\node_modules\esbuild\lib\main.js:1097:9
at C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\node_modules\esbuild\lib\main.js:637:9
at handleIncomingPacket (C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\node_modules\esbuild\lib\main.js:734:9)
at Socket.readFromStdout (C:\Users\admin\AppData\Roaming\npm-cache\_npx\14972\node_modules\ngc-esbuild\node_modules\esbuild\lib\main.js:604:7)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:290:12)
at readableAddChunk (internal/streams/readable.js:265:9)
at Socket.Readable.push (internal/streams/readable.js:204:10)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:14972) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a cat
ch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:14972) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Is there a chance to get it to work with nx' standalone apps and libs?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.