Πηγαίνετε εκτός σύνδεσης με την εφαρμογή Player FM !
Titus Wormer Chats About ECMAScript Modules
Manage episode 303801008 series 2530175
It's time to embrace ESM (ECMAScript Module). NodeJS is providing support for ESM out of the box. With ESM modules coming out of the experimental stage we're going to see a lot of packages begin to embrace it.
ESM provides superior organization of your code by allowing you to more easily create smaller, reusable chunks of code. ESM gives you a "module scope" where not only are functions and variables available to each other in the same module but also allows you to explicitly make them available to other modules. There is also the Loader API that is currently in its experimental stages.
In this episode, you'll also learn about more differences between ESM and CommonJS, and some of the challenges and potential problems of using native ESM today.
Homework
- Follow along with one of the following blog posts:
- Super Simple Start to ESModules in Node.js
- Super Simple Start to ESModules in the Browser
Resources
Guest: Titus Wormer
- Twitter: @wooorm
- GitHub: @wooorm
- Website: wooorm.com
Host: Kent C. Dodds
- Website: kentcdodds.com
- Twitter: @kentcdodds
- GitHub: @kentcdodds
- YouTube: Kent C. Dodds
- Epic React: epicreact.dev
93 επεισόδια
Manage episode 303801008 series 2530175
It's time to embrace ESM (ECMAScript Module). NodeJS is providing support for ESM out of the box. With ESM modules coming out of the experimental stage we're going to see a lot of packages begin to embrace it.
ESM provides superior organization of your code by allowing you to more easily create smaller, reusable chunks of code. ESM gives you a "module scope" where not only are functions and variables available to each other in the same module but also allows you to explicitly make them available to other modules. There is also the Loader API that is currently in its experimental stages.
In this episode, you'll also learn about more differences between ESM and CommonJS, and some of the challenges and potential problems of using native ESM today.
Homework
- Follow along with one of the following blog posts:
- Super Simple Start to ESModules in Node.js
- Super Simple Start to ESModules in the Browser
Resources
Guest: Titus Wormer
- Twitter: @wooorm
- GitHub: @wooorm
- Website: wooorm.com
Host: Kent C. Dodds
- Website: kentcdodds.com
- Twitter: @kentcdodds
- GitHub: @kentcdodds
- YouTube: Kent C. Dodds
- Epic React: epicreact.dev
93 επεισόδια
Όλα τα επεισόδια
×Καλώς ήλθατε στο Player FM!
Το FM Player σαρώνει τον ιστό για podcasts υψηλής ποιότητας για να απολαύσετε αυτή τη στιγμή. Είναι η καλύτερη εφαρμογή podcast και λειτουργεί σε Android, iPhone και στον ιστό. Εγγραφή για συγχρονισμό συνδρομών σε όλες τις συσκευές.