platform icon indicating copy to clipboard operation
platform copied to clipboard

bundling a feature using ngrx selectors as a reusable library with ng-packagr

Open ymcnicoll opened this issue 8 years ago • 2 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

What is the current behavior?

When bundling an Angular 5 module exposing selectors with ng-packagr I get errors with Dictionnary cannot be named.

This all works fine when module is embedded in an app. Only the packaging fails

Expected behavior:

Would expect this to work.

When replacing build-in selector functions by equivalent from Reselect there are no issues with the bundling

Minimal reproduction of the problem with instructions:

Create a minimal Angular project using ngrx and exposing selectors so that users of reusable library can access them and build lib using ng-packagr

ymcnicoll avatar Dec 08 '17 22:12 ymcnicoll

Please provide an actual reproduction of the issue. This is a TypeScript issue https://github.com/Microsoft/TypeScript/issues/9944

brandonroberts avatar Dec 13 '17 14:12 brandonroberts

what you mean by reproduction ? if you referring to an example, then imagine having an Application that supports white-lableing, each feature you will have in a separate module, that you would like to re-use , depending on your core app configuration. I am for example how do you create a feature with state in a reusable module using ng-packagr, or whatever tooling. For example having a product feature, that you can npm install that contains everything to do with product and has also it own child state.

createbuildship avatar May 10 '18 10:05 createbuildship