337: ES Modules on CodePen

Posted on

I/O modules are a native feature of Javascript! The import and export keywords are actually a very powerful thing for a language. You can of course use them directly on CodePen. For example, with our URL extensions you can export tricks of a pen and import into another without having to use the External Resources feature in Settings or anything, which might make your code clearer.

Then with amazing services like Skypackyou have everyone from npm at your disposal import. Here is a whole collection examples like that. React is an easy pick:

CodePen Embed Fallback

ES modules are getting more and more sophisticated!

import all the things!

Sponsor: Netlify

Among the many incredibly innovative things Netlify has done are offer cloud functions for any site you publish on Netlify. You entrust your duties to a functions folder (configurable) and they will run as AWS Lambda functions, without you even needing to have an AWS account or take care of this ceremony. Now, if you need some server-side code for your otherwise static site, you have it. Incredibly useful for doing any kind of dynamic functionality that needs to reach databases or APIs with security. And hey, if you need import Things, you got it.

Post 337: ES Modules on CodePen first appeared on CodePen Blog.

Leave a Reply

Your email address will not be published.