angular-skyhook icon indicating copy to clipboard operation
angular-skyhook copied to clipboard

fix ivy build update angular

Open acb122 opened this issue 4 years ago • 6 comments

ngcc compiler was failing this fixes it by exporting the correct files which are being exported in the ngmodule. I have tested it locally and fixes the error i was seeing using ivy.

acb122 avatar Apr 25 '20 12:04 acb122

How this fixes Ivy build if it's simply disables Ivy mode?

trakhimenok avatar May 13 '20 08:05 trakhimenok

The library is placed into npm not rendered in IVY mode making it usable for everyone. If you are then running IVY angular has a compile step that runs when you npm install on the postinstall stage it compiles it to ivy runtime code. This fixes the code so it compiles to ivy runtime code.

acb122 avatar May 13 '20 08:05 acb122

@cormacrelf Please could you merge this in? would love to use the library on the project i am working on.

acb122 avatar May 22 '20 19:05 acb122

This still appears to be an issue with Angular 10, despite their compiler fallback optimizations. Just FYI.

lincolnthree avatar Jul 03 '20 17:07 lincolnthree

Are you running my branch as its still not merged in, I am using my branch and it works fine with angular 10 Ivy.

@cormacrelf Please review so we can easily use your library.

acb122 avatar Jul 06 '20 08:07 acb122

Interesting @acb122 - I tried your master branch (which was referenced in the PR) but was unable to get it to work --- it might actually work, but I am also using the multi-backend module so maybe this was just an additional issue.

I ended up making a whole bunch of local modifications and finally tracked the issue down to improper initialization of the default multi backend which was failing to create the HTML5ToTouch backend. This is what I ended up with after upgrading dnd-multi-backend@latest:

    SkyhookDndModule.forRoot({ backend: createDefaultMultiBackend(), options: HTML5ToTouch }),
export function createDefaultMultiBackend(): BackendFactory {
    return (manager, ctx) => {
      return MultiBackend(manager, ctx, HTML5ToTouch) as any;
    };
}

lincolnthree avatar Jul 06 '20 16:07 lincolnthree