Skip to content
0:00 / 0:00

#moduleresolution#tsconfig#typescript

A horrifically deep dive into TypeScript module resolution

Michigan TypeScript

22K subscribers • 12 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Ian VanSchooten, lead frontend developer at Defined Networking
  • Linked in the descriptionIanVS/ts-module-resolution-examples

Advanced. Deep dive for people who know the field.

9.4K views3 years ago1 recommendation

Programming languagesTypeScriptBuild systems and packaging

Ian VanSchooten explains how TypeScript resolves modules, how to configure moduleResolution, and how to debug common import issues.

Getting TypeScript to find the modules you’re importing can be surprisingly tricky. It is controlled by the moduleResolution configuration option, file extensions, and even the syntax you use. This talk: 1) Breaks down what module resolution means in TypeScript 2) Explains the various options you can set 3) Shows how to debug module resolution problems 4) Dives in maybe a bit too deep to explore how it works in different situations We also find out about some current resolution shortcomings when using TypeScript with a bundler, along with proposed improvements happening within TypeScript. The examples repository is github.com/IanVS/ts-module-resolution-examples Ian VanSchooten is the lead frontend developer at Defined Networking (defined.net/) and a core Storybook team member focused on Vite and pnpm support. - Introduction - What is Module Resolution - TypeScript options - "Classic" moduleResolution - "Node" moduleResolution - "Node16" moduleResolution - Examples repository - Node: Relative - Node: Non-relative - Node: Package - Node: Index - Node: JavaScript - Node: Mixed JS & TS - Node: TypesVersions - Node16: New rules - Node16: Relative - Node16: Export map - Ambient types: Definitely Typed - Ambient types: typesRoot - New moduleResolution options - Summary - Questions Discord: discord.gg/tmhGfR4Dye Twitter: twitter.com/MiTypeScript Mastodon: fosstodon.org/@MichiganTypeScript Instagram: instagram.com/michigantypescript TikTok: tiktok.com/@michigantypescript

Why it's here

1 person recommends this

What people say. Recommended as an incredibly thorough and helpful guide to understanding and debugging TypeScript module resolution.

u/AtmosphereDefiantin r/typescript • Recommends

A horrifically deep dive into TypeScript module resolution

u/dimitropoulosin r/typescript • Mentions

On “Is it possible to consume a .d.ts generated for module based packages from plain TypeScript?”

It's not strictly based on the browser, but I bet you'd be interested in this deep dive into TypeScript module resolution.