Importing libraries and require() #122
Replies: 3 comments
-
Hey @gamesbyangelina – good question... at the moment I don't have support for JS modules (as I last recall, it was an issue that imported module JS couldn't talk to regular ones?)... been slowly exploring ways to go about it, especially in the order of events the iframe page is built. Until now almost every lib I've wanted to include also had 'plain browser' version exported as well, so I'd be curious what libraries are you attempting to load? Is it libraries intended for NodeJS? Sometimes libraries import instructions includes a CDN path, where it doesn't have to be added as require/import... |
Beta Was this translation helpful? Give feedback.
-
Ah it's express.js which unfortunately doesn't have a non-node alternative. It makes sense that it's not possible! I wonder if I can figure out a workaround that exposes the same functionality through p5live itself... |
Beta Was this translation helpful? Give feedback.
-
Yeah, that's a node.js library for running a directory/project as a webserver (P5LIVE offline mode uses it). Describe what you're interested to do and I'll think about if/how to integrate with P5LIVE. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
I'm currently trying to include some libraries for p5live coding. Some of the libraries have require() calls in them - which p5live doesn't seem to allow. Is there a workaround for this?
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions