We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi. I'm using webpack to build webgl experiments. I've tried to put inside my stack p5.js. I get this warning in the console.log:
./~/p5/lib/p5.js
Critical dependencies:
2:475-482 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
@ ./~/p5/lib/p5.js 2:475-482
What is the supposed way to build it outside the p5.js editor?
Answers
You could try the source from: https://p5js.org/download/
...but looking at the message (that appears to only be a warning anyway) it's probably expecting you to feed it the original source modules (that's what Webpack is designed to work with after all). You can get those on GitHub but I'm not sure I'd recommend that approach as you'll then be complicating your own build task exponentially.
Or maybe the version on npm will play better with webpack?