Questions tagged [ng-packagr]

a tool to transpile your libraries to Angular Package Format

Resources:

  1. GitHub: https://github.com/dherges/ng-packagr
  2. NPM: https://www.npmjs.com/package/ng-packagr
  3. Example: https://github.com/dherges/ng-packaged
247 questions
0
votes
0 answers

After packaging my Angular 5 library using ng-packagr, the library doesn't work once is used on an Angular application

Currently I'm working with the following versions: typescript --> 2.6.2 angular --> 5.2.1 @angular/cli --> 1.6.5 After packaging my own library with some components using ng-packagr ("ng-packagr": "^1.6.0"), I added the files created on my…
0
votes
1 answer

Integrating ng-packagr generated package with Angular CLI app: Module not found

Here's a repo that reproduces it: https://github.com/dragonflypl/ng-packagr-issue I've create a simple package logging. npm run build generates the library + does npm pack Then I generated fooGui with Angular CLI and installed library it via npm…
dragonfly
  • 17,407
  • 30
  • 110
  • 219
0
votes
0 answers

Field 'browser' doesn't contain a valid alias configuration when importing a feature module

I built an Angular application [MASTER]. Inside of it, I would like to import another application built with a feature module [FEATURE_MODULE]. To generate the FEATURE_MODULE, I followed this tutorial: Modules tutorial. This exports a feature module…
0
votes
1 answer

Dynamically inject/swap service in Angular 2+ package

I have an issue with inject service dynamically. // NPM Package 1: @Injectable() export abstract class BaseService { ... } @Injectable() export class ServiceA extends BaseService { ... } @Injectable() export class ServiceB extends BaseService { ...…
user3616544
  • 1,023
  • 1
  • 9
  • 31
0
votes
1 answer

"export 'default' (imported as 'core_1') was not found in '@angular/core'

I'm building an Angular library with ng-packagr. When serving my app with the packed library used, I get this warning: . Furthermore, when serving the app, I get this errormessage: core_1 is imported alongside other modules in the top: import…
kodeaben
  • 1,829
  • 3
  • 24
  • 33
-1
votes
2 answers

Material doesn't work in Angular 13 library project

I have an Angular 13 library on the go. It works with the other modules I have already got in there, but this new module I'm moving into place uses material, and it's not happy. The new module itself is fine and builds until I make any kind of use…
Krenom
  • 1,894
  • 1
  • 13
  • 20
-1
votes
1 answer

ng build --aot fails but ng build works fine with installed library

We have a library project that lives in an nx project that we publish to npmjs. It's a collection of components derived from @angular/material. The library is published to npmjs @vdlx/vdl-angular. Our build uses ng-packagr to build each of the…
1 2 3
16
17