processing / processing/p5.js-web-editor
Add import and export as ESM Modules
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 1.7k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 8
Description
Increasing Access
I have many problems just importing a class from other file in my sketch. The problem is that p5.js Web Editor doesnt work like all the JS frameworks or code. Also it doesnt show any messages to solve this, only doesnt work and leave the canvas in blank
Feature request details
Use import/export like ESM estandard modules.
You can see an example of code that should work in p5.js Web Editor ( it works fine in Webstorm or VS Code), but doent work. You have to delete the export and import keywords to work properly.
Would be nice that p5.js Web Editor would at least show a messge that import/export doesnt work or suggest to change the code.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the linked sketch in the p5.js Web Editor and confirm how its import/export statements fail compared with WebStorm or VS Code. Trace the editor's current sketch loading and module handling, then verify that ESM imports work and that unsupported module syntax produces a useful message rather than a blank canvas.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100