Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
angular2-aot-webpack
Advanced tools
Angular 2 AOT (Ahead Of Time) offline compilation example with Webpack
This repository shows how to use the Angular 2 command line offline compiler ngc
with Webpack.
Additionally it shows an alternative to ngc
with @ngtools/webpack
plugin used in the Angular CLI.
The application consists of a basic component (src/app/components/hello-world.component.ts
)
and a module (src/app/modules/main.module.ts
).
When the application starts (npm start
)
it generates the compiled files next to the modules and the components(*.ngfactory.ts
).
There is a different entry point for the non compiled(src/app/bootstrap.ts
)
and AOT compiled application(src/app/bootstrap.aot.ts
).
The difference between the development and production version is minification with UglifyJS. Both development and production builds create the AOT compiled files.
The application is bundled with Webpack from the bootstrap files and is available on http://localhost:9000
.
You can change between the different builds with commenting/uncommenting entry files in src/index.html
.
There are two modes for the application.
Using the command line tool ngc
for compilation is the default one
and can be started with npm start
. It bundles once and watches for file changes with chokidar
and re-runs the compilation on change.
The second one is using the @ngtools/webpack
loader plugin for compilation
and can be started with npm run start-plugin
. It uses webpack-dev-server
and
live reloads on every file change.
npm install
: delete the node_modules
directory and do a clean install.FAQs
Angular 2 AOT (Ahead Of Time) offline compilation example with Webpack
The npm package angular2-aot-webpack receives a total of 2 weekly downloads. As such, angular2-aot-webpack popularity was classified as not popular.
We found that angular2-aot-webpack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.