Just an example to post on Stackoverflow to ask how this would work. See src/routes/+page.svelte
Problem: Importing p5 as a dev dependency doesn't work (500 "window not defined")
Solution: switch off SSR (Server Side Rendering) in an additional +page.js file: export const ssr = false;
Thanks for the help to H.B. on GitHub!