-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
angular 2 - webpack module import support #23
Comments
I don't know. I don't use angular. Could you explain what limitations are preventing this from being used with ng2. As far as I can tell the import statement you have there is like an es2015 import. Can you direct me to some documentation that would show me some method of introducing compatibility with angular? |
@manuelfink All you need to do to import dom-autoscroller is two steps:
|
Thanks @zacol. Let me know if that solves this @manuelfink . |
Since this seems to be solved I'm closing. @manuelfink Thanks anyway. I learned a little bit about angular while researching for this. |
I know this issue is closed, but in case @manuelfink was still having a problem, I had a problem with this but the problem was problem with Webpack, not Angular. There's an indirect dependency on an npm module called 'iselement' via the dependency on 'dom-set' by this project. iselement's package.json is incorrect and directs Webpack's require resolver to the wrong .js file. The fix that worked for me was to add the
Note that I'm still using Webpack 1. If you are using Webpack 2 I believe the property is now called |
@eeubank In the latest version of |
Hi, I'm trying to add
@manuelfink Let me know if you managed a work-around but I've been trying to get this to work for quite some time with no luck. I'm using the latest angular (4.4.5), if someone could help me with this import or point me to another ng4 auto-scroll library with good documentation/demo I would be extremely grateful |
@pbasnagetr The export is default so you'd do: import autoScroller from 'dom-autoscroller'; |
I get the same error both when I include that in my component and my app.module.ts |
I'm not familiar with Typescript. Looking at similar issues elsewhere people have their Also see https://www.reddit.com/r/typescript/comments/6g1fgy/importing_nontyped_modules_with_noimplicitany/ |
@pbasnagetr / @manuelfink were you able to resolve the dependency? |
@arj060892 I'd suggest abandoning Dragula for a drag library that is still active, being updated, and has this feature. I've switched to Sortable myself. |
I don't know if this is the problem, but the way a lot of libraries handle default is different than the way it used to be. webpack, and babel do this. It's possible typescript is doing it as well. So maybe sometimes this is the problem if a person is using a newer version of these libraries. import auto from 'dom-auto-scroller';
const autoScroller = auto.default; I use rollup personally which exports default the obvious way. Though rollup could change in the future. |
I'm looking for a way to use with this https://github.com/valor-software/ng2-dragula in angular 2. Is it possible to add support to import in ng2 with:
import {autoScroll} from 'dom-autoscroller';
The text was updated successfully, but these errors were encountered: