bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
21.89k stars 1.97k forks source link

Import dragula in angular 5 JIT not working #545

Closed natcohen closed 6 years ago

natcohen commented 6 years ago

I use dragula in my angular-cli project and need to import the dragula object. In my package.json, I added dragula as a dependency and in my component, I import dragula as follow:

import dragula from 'dragula';

I then log the object to see if it exists console.log(dragula). Surprisingly when I compile the app in AOT mode, the object exists while when I build it in JIT mode, it doesn't exist! Is it a bug from dragula or am I missing something?

natcohen commented 6 years ago

Seems to be an angular-cli bug https://github.com/angular/angular-cli/issues/9059