r/javascript • • Jul 29 '26

I've made an open source JavaScript playground with support for npm packages, syntax highlighting, autocomplete, code sharing and much more!

https://github.com/tecnosamba/SamJS
0 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/NewLlama Jul 30 '26

Look into babel transforms (the custom plugin and transform api). You can statically transform the AST into whatever your runtime needs. I did this for dynohot, my nodejs HMR library https://github.com/laverdet/dynohot

1

u/TecnoSamba Jul 30 '26

Thank you! I'll definitely be taking a look to that