Nice, I found the video tutorial of V2 - https://youtu.be/h3_6K6MYTFc?t=198
so I understand it definitely is possible, but I'm having issues with my project structure.
I just have a mono-repo with a lib that I require with a relative path beneath the file I try to drop:
const stuff = require('../eurorack-lib/eurorack-lib')
Neither dropping a module (with package.json:main set) nor a simple js file works for me, I just get:
Uncaught Error: No file eurorack-lib/eurorack-lib found
When uploading a folder it seems to traverse the whole thing, but of course something relative like
'../eurorack-lib/ wont be there. This worked for the desktop app, but not here. I guess it's a no-brainer the webapp can't handle those kinds of relative file imports - the files aren't there.
So what's the recommended way if I really want to use node modules as a workflow? If I have a library shared among many designs I mean - I can't just copy it to every design… And I would guess symlinking like
npm link wouldn't work either? Or does it resolve those at upload time? Gonna test that…
If I understand correctly, the
requires on jscad itself like in the example here: https://github.com/kaosat-dev/gofree/blob/f30e0843ff5fb9872789968d39da03e06458a2a2/cad/tutorial0/index.js#L1 are shot in from the side on the "server" (rather already bundled in the site's js?) but any other module than that would need to be uploaded together with the design, right?
Just not sure how to do this correctly… Any tips highly appreciated!