no
this is a simple test ng 8.0 + ivy + library. is it ivy supported custom library ?
this is the error message i get :
Error: Type MyLibModule does not have 'ngModuleDef' property.
if i turn off ivy, all work fine
https://github.com/keatkeat87/angular-ivy-library-issue
step :
ng new library-and-project-issue --enable-ivy
cd library-and-project-issue
ng g library my-lib
ng build my-lib
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { MyLibModule } from 'my-lib'; // add
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
MyLibModule // add
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
ng serve --open
Angular Version:
Angular CLI: 8.0.0
Node: 12.3.1
OS: win32 x64
Angular:
...
@angular-devkit/architect 0.800.0
@angular-devkit/core 8.0.0
@angular-devkit/schematics 8.0.0
@schematics/angular 8.0.0
@schematics/update 0.800.0
rxjs 6.4.0
Libraries outside of node_modules that are made available using paths-mapping are not currently processed by ngcc, so they are not compiled for Ivy usage. For the time being you can run ./node_modules/.bin/ivy-ngcc -s ./dist each time after building the library and before serving.
oic, any road map for this feature ?
./node_modules/.bin/ivy-ngcc -s ./dist <-- it work, but ... i can't do this all day ... /.\
@manughub could this be moved to @angular/angular-cli, as it is caused by how @ngtools/webpack processes modules.
I've moved this issue to the CLI repo. We don't yet have good support for Ivy libraries in the CLI.
Hi @keatkeat87, yes this is something in the roadmap to add ngcc processing on workspace libraries. We are targeting this for 8.1
Thanks
Checkout
Going to re-open this as it's seems that it is not fully resolved
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Hi @keatkeat87, yes this is something in the roadmap to add ngcc processing on workspace libraries. We are targeting this for 8.1
Thanks