I am building an angular library and have figured out how to get assets into the dist folder I'm using it to include a file called "postInstall.js", however I need to run the postInstall.js file, I can do that by including an NPM post install…
Using ng-packagr I got this error during the build:
No name was provided for external module 'ngx-cookie-service' in output.globals – guessing 'ngxCookieService'
My package.json looks like:
{
"$schema":…
How do I structure an Angular library, when I both want to have a public API/SDK and an internal API/SDK.
The public API/SDK is for third party usage.
The internal API/SDK is for internal usage.
So what I want to achieve, is not to expose internal…
with the new version of ng-packagr (9.0.1+) it is possible to copy assets from an Angular library into the dist folder.
See also:
https://github.com/ng-packagr/ng-packagr/blob/master/docs/copy-assets.md
So far it works. However, I currently have the…
I was given the requirement to include the version of my Angular 9 app as part of the HTML metadata. The version number is obtained from
import { version } from '../../../package.json';
For both local and Azure DevOps pipeline build, we use…
Recently I updated one of my projects from Angular 8 to Angular 9.
When I try to build the library I am getting this warning
__read' is imported from external module 'tslib' but never used
This warning was not there previously with version 8. I…
I have an Angular 9 library which I would like to push to registry.
When I run ng build , it builds correctly, but it complains about Ivy:
******************************************************************************
It is not recommended…
I am new at building Angular Library. I have created an angular library successfully from CLI. However, I wanted to add a new service(class) in the library. And while I want to build the library, its always throwing the error as in the screenshot:
…
I am building a custom library with ng-packagr and an application that consumes the library. When I run the application, the styles from the library aren't working. When I look in the browser at the styles generated, I noticed something odd. It…
I have created an Application with a Component Library. My library contains routes. When I try to lazy load the library into the application I use the following route:
const routes: Routes = [
{ path: 'test2', loadChildren: () => import('my-lib'…
I'm using Angular 7 and building a library with ng-packagr.
After upgrading to latest version of ng-packagr and lodash, I get this error
ERROR: 'isString' is not exported by node_modules\lodash\lodash.js
'isString' is not exported by…
I need to build a set of libraries for my Ionic app, for reduce the time-to-market and have a sharable pieces of code. I found ng-packagr and i'm tring to figure out how to make it work with Ionic 3.9.5.
During the build phase (running ng-packagr…
I am trying to create a library with multiple modules in it. My library structure is as below.
I have multiple modules like common-ui.
Problem 1
I have the module and i have index.ts files in each of the folders shown above, and from my public.ts i…
I am experiencing a really obscure error message in Angular 7 when trying to use @Input inheritance. The error message does not make any sense because I have 1 mandatory @Input and 2 optional @Input so the math don't add up...
Directive MyComponent,…
Shared Component Setup
I have a shared angular component, with as a secondary entry point a bunch of protractor utilities to make it easier to test from the consuming application. We don't do monorepo so the repository is dedicated only to that one…