Open ronnetzer opened 3 years ago
can be reproduced in you starter template by running yarn start:ve
without changing anything and it will throw the same error
@shlomiassaf any news? this is a serious blocker and I have no clue how to fix it
@ronnetzer I'm not sure I understand.
The build tool is from angular and I assume it's a mess due to all of the VE to/from IVY convertions.
In general, the drag module is a compiled module which makes use of other ngrid compiled modules which I built with no issues.
Or another example, @pebula/ngrid-material
is a standalone package, compiled with ng-packger using @pebula/ngrid
and other ngrid libraries as dependencies. Here, as well, compilation goes ok.
EDIT
I think @pebula/ngrid-material
is not using @pebula/ngrid/drag
directly which might be a clue.
I'll throw things and let's think...
In general, there might be a difference when building with dependencies that are local.
I.E Building @pebula/ngrid-material
when @pebula/ngrid
is local (but not included in @pebula/ngrid-material
)
And building from node_modules
dependencies, which make use of NGCC artifacts, metadata outputs etc...
@pebula/ngrid/drag
is using component inheritance, to inherit some CDK components.
It was not supported in angular before v11 but now it is so I ported to it.
Maybe the inheritance is not yet supported by the ng-packger tool from angular since it's still using VE to build.
I assume once they provide the new IVY package builder it will be sorted out.
I believe that it's probably (2) mixed with (1), looks like it fits
About fixing it, it will be costly, I need to port back the DRAG module to use inheritance via composition and not by extending a class.
The code in the V2 branch does that, but it got changed since then so it's work.
In general it means replicating the structure and calling methods through the prototype of the base class from the CDK.
Since 12 is around the corner, can you hold with that and see maybe they fixed the whole thing?
@shlomiassaf Thanks for the feedback. Sounds like v12 is the way to go forward.
I'll revisit this issue when v4 is ready
What is the expected behavior?
In version 2 it was possible to use
PblNgridDragModule
in a publishable library.What is the current behavior?
Using
PblNgridDragModule
in a publishable library breaks the library's build which is being done (angular 11) withenableIvy: false
. it produces the following errorWhat are the steps to reproduce?
PblNgridDragModule
.-c=production
flag.Which versions of Angular, CDK, Material, NGrid, OS, TypeScript, browsers are affected?
ngrid: 3.x angular,cdk,material: 11.x typescript: 4.0.x
Is there anything else we should know?