
Syntax - Tasty Web Development Treats Supper Club × Shipping ESM with Mark Erikson
8 snips
Sep 1, 2023 Mark Erikson, a maintainer of Redux and React packages, shares insights on navigating the world of ECMAScript Modules (ESM). He discusses the complexities of shipping packages, particularly the challenges of managing different module formats and the role of bundlers. The conversation covers whether default imports are helpful, the impact of TypeScript on development, and the tools Erikson uses for building. He also touches upon the future of bundling and the significance of source maps in modern JavaScript development.
AI Snips
Chapters
Transcript
Episode notes
Permutation testing
- Wes Bos encountered testing challenges with a small library due to numerous permutations.
- He needed to test nine different versions, illustrating the complexity of supporting various module types.
Package.json Exports
- Define entry points, types, and module formats using the "exports" key in package.json.
- Use nested conditions within "exports" to specify files based on development/production environments.
Upstream Dependency Issues
- Mark's initial Redux Toolkit update failed due to Jest's issues with Redux Thunk and Immer's exports.
- Upstream dependencies can cause problems with ESM transitions, requiring coordination with other maintainers.
