[build] Switch tsconfig base moduleResolution to bundler#1789
Conversation
🦋 Changeset detectedLatest commit: 1ec1c8c The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Size Change: 0 B Total Size: 10.1 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Pull request overview
This PR updates the TypeScript module resolution strategy from "Node" to "bundler" in the base TypeScript configuration, aligning TypeScript's import resolution with the project's bundler-based build tooling (Vite/Rollup). The change affects all packages in the monorepo that extend tsconfig.base.json.
Changes:
- Changed moduleResolution from "Node" to "bundler" in tsconfig.base.json
- Added an empty changeset for this internal configuration update
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tsconfig.base.json | Updated moduleResolution to "bundler" to align TypeScript resolution with Vite/Rollup |
| .changeset/cool-cars-smile.md | Empty changeset following project convention for internal-only config changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Switch moduleResolution in tsconfig.base.json from Node to bundler
Why
rrweb is built as ESM with bundler-first tooling (Vite/Rollup). Using moduleResolution=bundler makes TypeScript resolve imports the same way our bundler does, including modern package exports/imports behavior.
This alignment helps catch invalid deep imports earlier and reduces TS-vs-bundler mismatches where code type-checks but fails during bundling or runtime.