Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow bare imports of ts packages in a monorepo #18641

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sheremet-va
Copy link
Member

Description

This PR adds support for bare imports of packages that export a TS entry point:

import pkg from '@monorepo/ts' // <-- exports .ts file
export default defineConfig({
  ...pkg.sharedConfig,
})

Currently, vite resolves the .ts file but keeps it external which breaks in Node:

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /react-monorepo-ts/packages/components/src/test.ts

TODO

  • Tests

@bluwy
Copy link
Member

bluwy commented Nov 12, 2024

fwiw this looks similar to #17323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants