Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add import and export as ESM Modules #3304

Open
ejgutierrez74 opened this issue Dec 21, 2024 · 1 comment
Open

Add import and export as ESM Modules #3304

ejgutierrez74 opened this issue Dec 21, 2024 · 1 comment

Comments

@ejgutierrez74
Copy link

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.

https://editor.p5js.org/egutie9/sketches/O_xfapq72

Copy link

welcome bot commented Dec 21, 2024

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant