Webpack does not resolve module 'bubblechart' even if module was installed via npm
In order to use this as a module through npm, you need to manually build it before hand. Which means having things like grunt installed, even if you are relying on other build system like webpack, for instance.
The usual approach to this is build and publish minified and dist source code along with rest of code at GitHub.
This was premature. I can see the files present at dist now. My issue resolving the module should have other reason. In case you are curious my real problem is this error output from a Webpack build:
Module not found: Error: Cannot resolve module 'bubblechart'
Thanks! Back when this was originally built I did not do a good job of making it play well with module loaders. I would definitely accept a Pull Request to improve the module loader compatibility. :+1:
Adding main entry to package.json solved my issue. I think we could have that in master branch here.
...
"main": "./dist/bubblechart.js",
...
Right, but I think we also need to make sure it doesn't attach globally when required, but return the BubbleChart class.
It should only attach globally when not requiring via a module system. See this for example
Excellent point :+1: