I created a data library, then tried to include the data library into another created library. Built fine, but received - "No name was provided for external module 'my-data' in output.globals – guessing 'myData'". What am I missing?
Complete steps to re-create.
- ng new test-project --create=application=false
- cd test-project
- npm audit fix
- ng g library my-data
- ng g library my-core
- ng g application address-book
- ng build my-data
- Then in my-core.module add import { MyDataModule } from 'my-data';
- Then in my-core.module add imports: [MyDataModule]
- ng build my-core
my-core.module.ts
import { NgModule } from '@angular/core';
import { MyCoreComponent } from './my-core.component';
import { MyDataModule } from 'my-data';
@NgModule({
declarations: [MyCoreComponent],
imports: [MyDataModule],
exports: [MyCoreComponent]
})
export class MyCoreModule { }
- After build get "No name was provided for external module 'my-data' in output.globals – guessing 'myData'"