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 created an application with Angular-cli, and when I run ng serve or ng build everything works fine, I don't have any error; but when I run ng build -aot I have the following errors :
ERROR in Child compilation failed:
Module build failed:…
I am using Angular components in Angular universal sample.
My Angular components are wrapper of java script widget and widget uses window.jqueryto render control.
when m importing my Angular components m facing issue like below.
An unhandled…
Is it possible to make the following code AoT-compatible?
interface Config {
someField?: string;
anotherField?: number;
}
@NgModule({})
export class SomeModule {
protected static _config: Config;
public static…
Directed by the answer to my question about Server-side rendering, I'm looking at implementing AOT compilation in my Angular2 app.
A bit of background to the problem I'm having: we have a build running in Visual Studio Online, which runs webpack…
I've just upgraded to Angular 4.1.1
From what i understand, AOT is now on by default(which is great).
I have a guard that don't use the next param.
If i try to run the code as is i get 'next' is declared but never used.
error.
If i remove the…
I am trying to use the @ngtools/webpack plugin to create an AoT version of my Angular 4 app within webpack 2, but I am having difficulty understanding what this plugin produces.
In particular, I have a main.aot.ts entry point in my webpack for AoT,…
I am configuring my Angular 4 app to build using AoT for production, as described in this post and GitHub repository.
There have been lots of errors in this process, mainly pertaining to @types which I have resolved, but there is one curious error…
I am using ng2-admin template following their installation guide https://akveo.github.io/ng2-admin/articles/002-installation-guidelines/ it is running perfectly in local but when I am creating production build using "npm run build:prod:aot" and…
If I have a template like this (readOnly is a boolean and arrayOfStuff is an array):
Hey
ng build --prod orng serve --prod both give the error:
ERROR in…
I have recently migrated my project to use Angular CLI to package my project. It works fine using "ng build" but when I try to use "ng build --prod" (which in turn uses Angular AOT and other additional steps) I get these errors:
ERROR in Cannot…
I am new to Angular 2. I have developed one small application. In my application there is a Login and Register page.
After all done I have build my app using
ng build --prod --aot
All the js is minified and It all work fine.
My question is now I…
I've implemented a RouteConfigBuilder for my specific purpose clear the routes declarations with custom variables.
route-builder.type.ts
export class RouteBuilder {
private routeConfigBuilders: RouteConfigBuilder[] = [];
private…
I am having an app using d3.js, when I compile the code using rollup, I got this error in browser,
Uncaught TypeError: Cannot read property 'document' of undefined
It is something like this from d3.js:
!function() {
var d3 = {
version:…
Am getting below error message with rollup.config.js file
� warning.indexOf is not a function
rollup.config.js
import nodeResolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs';
import uglify from…
Angular Version: 2.4.10
Angular Cli Version: 1.0.0-rc.4
Build command used: ng build --aot (no --prod so i can use source-map-explorer )
I am not sure i understand how the build process organizes the modules and i must be making a mistake somewhere.…