I’m trying to run a script based on p5js library, it works well in a classic file (index.html, css, and scripts) but if I run this with parcel (npm run dev), there are no errors but the elements expected are not created in the page.
(I create a canvas in the setup function, to have a cursor trail one my page, but the canvas don’t appears when i run width Parcel)
@Lotas94 Hey there I can help you. Parcel bundles the libraries that are imported into your code. Moreover, when you do this with p5, you’ll need to use the instance mode of p5. This is because Parcel will create separate scopes for all modules (i.e. no more global variables!).
I have a project that does exactly this (parcel and p5). You can see the code and learn from there.