Skip to content

Conversation

@snebjorn
Copy link
Contributor

Enabled https://tsdown.dev/options/package-exports#dev-exports it should:

During development, you may want your exports to point directly to your source files for better debugging and editor support

Unfortunately nodejs is real picky about imports... it requires the file extension and doesn't support barrels (index).

If anyone got a better solution - let me know

@snebjorn snebjorn marked this pull request as draft November 11, 2025 19:28
@ScriptType
Copy link
Contributor

Normally you can do tsx

"dev": "tsx --watch src/index.ts"

but i think it wont work for monorepo and i think adding the file extension is the only real solution possible.

@snebjorn
Copy link
Contributor Author

Normally you can do tsx

"dev": "tsx --watch src/index.ts"

but i think it wont work for monorepo and i think adding the file extension is the only real solution possible.

The problem I ran into was samples/ and tests/ would use the src ts files from packages instead of the built output, which caused a bunch of other issues.

The goal:
References should work across packages inside packages/
samples/ and tests/ should use the built output, but still trigger breakpoints set in packages/

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.

2 participants