Open montoyamoraga opened 7 months ago
Thanks @tmartinez88. I just updated the permission, we can tag @limzykenneth now!
hi @tmartinez88 yeah, that's something i heavily struggled with, as far as i know, that preval was being done with the webpack build of the original library p5.sound.js, but now in this new one i followed the grunt build of p5.js, and with that i couldn't figure out how to make those audioworklets build correctly, here happy to help!
@tmartinez88 preval
is a Babel plugin that essentially do compile time execution and evaluation (in this case of the contents of the require statement).
Looking at the code for audioWorklet, I'm not entirely sure they are required since they are essentially importing values from another file and not really relying on the evaluation. Perhaps they can be replace directly with regular import statements?
after uncommenting the audioworklet imports and audioin prototype in the src/app.js file and building I get an error about "preval" not being defined at the audioWorklet/soundFileProcessor.js
could it be that preval is not being configured in the build configuration?
the old p5 sound library had this babel configuration file that is not in the new library https://github.com/processing/p5.js-sound/blob/main/.babelrc
@montoyamoraga @Qianqianye @raclim
not sure why i can't tag @limzkenneth !