roughViz
roughViz copied to clipboard
Installation via npm contains additional roughviz.min.js
Not really an issue but thought I would mention it. When installed via npm the dist folder contains two resources for the minified code:-
It wasn't immediately clear which one to use so maybe you can remove one.
Thanks for a great package.
Thanks!
I believe I can fix this by simply renaming roughviz.min.js
to index.js
? If not do you know a correct solution? I don't do too much front-end stuff so the npm stuff can be a bit of a hassle at times!
I believe I can fix this by simply renaming
roughviz.min.js
toindex.js
?
Sorry I initially raised this without doing much investigation hence my follow up with issue #8
I have not done any npm packaging as yet and I am certainly no expert but renaming roughviz.min.js
to index.js
does indeed resolve the issue for me.
You would need to confirm this resolves the issue for you as the contents of the original index.js looks build related so double check nothing wipes out your change following a build :)
The file rough-viz.min.js
is commited and checked into git
https://github.com/jwilber/roughViz/blob/master/dist/rough-viz.min.js
It looks like your build script (parcel) creates an UMD (for browsers) and a nodejs/commonjs version (that it can be require'd) https://github.com/jwilber/roughViz/blob/master/package.json#L7-L10
parcel creates roughviz.min.js
(without the dash -) and index.js (I think), but non of them create rough-viz.min.js
fyi you should consider having a module field that points directly to the source, so people can import es modules directly.
can you double check that the file dist/rough-viz.min.js
isn't generated
@MintyMods it's been a while since your comment, but I've tried renaming rough-viz.min.js
as well as roughViz.min.js
(both are still generated) to index.js
, but I am consistently getting the error you mentioned in #8
Uncaught TypeError: Cannot read property 'ownerDocument' of null
Have you worked with this recently and have any idea how I might resolve this? It might be worth mentioning that I am using svelte-kit, which is still in beta phase.
Nevermind this seems to be an issue with svelte-kit. Tried with Sapper (predecessor of svelte-kit), and it works. Thanks!
Hi @vcheeze,
To be honest I kinda put my project on hold to allow Svelte to mature a little more while I worked on something else but I do love the concept of Svelte and have been meaning to get back into my project with hopefully a little more time to investigate and contribute to some of the issues that I originally hit.
I was literally typing to offer help but just seen your update ;o)
Glad you resolved the issue my friend.
Cleaned this up (years later 🐌 ) with V2.
Can import ESM via import roughViz from "rough-viz";