Use angular2-aot for questions related to the Angular2 ahead-of-time compiler, which allows developers to deploy pre-compiled JavaScript code and HTML5 markup to the browser rather than TypeScript and Angular templates.
I'm trying to build angular2 application for production for that I'm following this blog. After my ngc successful compilation when the tsc compilation takes place it generates below error shown in the image:
After searching for a while I found this…
I am trying to pass config data into a custom library in Angular.
In the users application, they will pass some config data to my library using forRoot
// Import custom library
import { SampleModule, SampleService } from 'custom-library';
...
//…
so far the smallest bundle I can create with angular cli is by running
ng build --aot true -prod
I was wondering if the build process also removes unused css classes e.g. from bootstrap?
If not how can I add libraries like purifycss to it?
EDIT…
I'm trying to follow the official AoT guide for Angular 2, and I'm using Moment.js in my application. Moment.js is on my packages.json file, and I'm using version 2.15.0. I've been importing it like this so far:
import * as moment from…
Angular 2 rc 6, typescript 2, node 4.5.0, npm 2.15.9 on Windows 7
I'm trying to move from Just-in-Time to Ahead-of-Time compilation and I'm relying on these resources:
Angular 2 - Ahead-of-time compilation how…
I'm using angular 2 lazy routing. Client is bundled with webpack2 using AOT and angular-router-loader to lazy load children. Everything works as expected when the browser is connected, that is I can successfully navigate the router to the lazy…
I have an multilanguale app which is compiled with --aot in each language, for instance for German:
ng build --aot --env=prod --prod --build-optimizer --i18nFile=src/locale/DARI_messages_de_DE.xlf --i18nFormat=xlf --locale=de --missingTranslation…
I am using Angular 4. After AOT and run rollup in lazy module appears this error:
Error: Uncaught (in promise):TypeError: System.import is not a function
My project works fine in JIT but in AOT I could not redirect to lazy routes.
I could not…
Type of Issue: Bug / Question
Description
I'm using ng-packagr lib to compile my library to js. I've compiled everything without any problems, but when I'll want to consume my library with ng build --prod (AOT enabled), I'm getting error:
ERROR in…
My current Angular 2 project started before Angular supported the AOT feature. Now, I’m trying to get it to work. I'm receiving the following error and I've no clue what this means and where I can start to debug the issue:
ERROR in Error: Internal…
Is there a way to run the angular cli tests with the command ng test that tells the underlining compiler to use the ng build --prod settings?
I ask because here are often aot compilation errors encountered with ng build --prod that do not occur with…
I've build a app in Angular 2, and have encountered a issue.
I have used angular CLI to create my application, I have created my components and services using Angular CLI and I use "ng serve" to run the application locally and everything works fine.…
Trying to build an Angular 6 app. I am getting the following error when using --prod
ERROR in Error during template compile of 'AppModule'
Expression form not supported in 'reducers'
'reducers' contains the error at…