Say goodbye to CommonJS and use ESM! 👋
TypeScript with Benny Code
View ChannelAbout
Learn programming with TypeScript for FREE. Subscribe for new episodes.
Latest Posts
Video Description
CommonJS was a great invention but nowadays we have something better called ECMAScript Modules (ESM). Learn in this tutorial how to upgrade your TypeScript projects to ESM. *My FREE programming apps:* - https://apps.apple.com/app/id659282498 - https://play.google.com/store/apps/details?id=com.welovecoding.app *My FREE TypeScript Course:* - https://typescript.tv/ Timeline: 00:00 - Intro 00:31 - Understanding Scripts and Modules 01:38 - CommonJS: Exports and Imports 03:31 - HTML: Exports and Imports 06:14 - ESM: Exports and Imports 08:56 - Asynchronous Loading 10:08 - Enabling ESM in Node.js 11:21 - New Module File Extensions 12:25 - Network-based Module Loading 13:15 - TypeScript with Node: Using ESM 15:05 - TypeScript with Browsers: Using ESM 15:58 - When to Use ESNext 16:40 - When to Use NodeNext 17:34 - Import Attributes in TypeScript 18:00 - ESM Cheat Sheet Overview 20:13 - Using the import.meta API 20:36 - Why ESM is the Future #TypeScript #JavaScript #nodejs
Upgrade Your Coding Essentials
AI-recommended products based on this video

Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Garden Starter Kit Growing Kit Including Wooden Box Burlap Pots Soil Discs Gardening Tools Unique Easter Birthday Christmas Gift Ideas for Women Mom

Bonsai Starter Kit – 1x Bonsai Tree | Complete Indoor Starter Kit for Growing Plants with Bonsai Seeds, Tools & Planters – Gardening Gifts for Women & Men


