p5.js icon indicating copy to clipboard operation
p5.js copied to clipboard

Fix shader string compression issue on `npm run dev`

Open eupthere opened this issue 5 months ago • 0 comments

Resolves #8932

Changes:

  • Added compress: false option to preview/vite.config.mjs (used for npm run dev)
  • Modified gitignore to track default preview files. All the other user defined local html, sketch files are kept untracked.

Note

preview/global/vite.config.mjs (used for npm run dev:global) is untouched, because it doesn't have the same issue. It uses prebuilt lib/p5.js. The shader strings there are embedded by Rollup using rollup-plugin-string. It uses JSON.stringify() and preserves newlines.

PR Checklist

eupthere avatar Jun 18 '26 02:06 eupthere