Skip to content
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

Use via es6 import #9

Open
X-Tender opened this issue Mar 31, 2017 · 3 comments
Open

Use via es6 import #9

X-Tender opened this issue Mar 31, 2017 · 3 comments

Comments

@X-Tender
Copy link

I would like to use it like
import categorizr from 'categorizr';
or
const categorizr = require( 'categorizr' );

when installed via NPM.
But I always get told that I'm on mobile.
After some investigation I noticed that the context is an Empty Object and not window.
Known issue or did I make something wrong?

@iamdustan
Copy link
Contributor

Not known, but this project isn’t maintained. What bundler are you using? I’d guess that the modules this property is being set/wiped out in an odd way by your bundler. This is using a UMD pattern for exporting itself which may be outdated or incorrect now.

@X-Tender
Copy link
Author

X-Tender commented Apr 3, 2017

Oh snap! I use webpack. So better search for an alternative?

@iamdustan
Copy link
Contributor

Idk, I’d start off just following that trail a little bit further to see how webpack loads it and probably just configuring it accordingly. Alternatively a PR for updating the export method would be okay, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants