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

Support webpack and similar web bundlers #33

Open
ghost opened this issue Dec 18, 2017 · 2 comments
Open

Support webpack and similar web bundlers #33

ghost opened this issue Dec 18, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 18, 2017

Thanks for the library! Would be great if we could do the following:

import "hidpi-canvas"

const canvas = document.createElement('canvas') // will render in high resolution
// ...

Which would work with any asset bundler, such as webpack.

The benefit from this is that you don't need bower, as you can just keep your dependencies up-to-date with npm.

@jondavidjohn
Copy link
Owner

For sure! Any ideas on what is keeping this from working today? Maybe we just need a main entry in our package.json?

If you want to experiment with how, I'd welcome a PR 👍

@ghost
Copy link
Author

ghost commented Dec 18, 2017

All right. Unfortunately don't have much time right now, but I highly suspect that a missing main in package.json is indeed to blame.

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

1 participant