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

incompatible with typescript node16 resolution with type: module #95

Closed
JounQin opened this issue May 2, 2023 · 5 comments · Fixed by #101
Closed

incompatible with typescript node16 resolution with type: module #95

JounQin opened this issue May 2, 2023 · 5 comments · Fixed by #101

Comments

@JounQin
Copy link

JounQin commented May 2, 2023

image

This is because .d.ts is considered as commonjs declaration by default

@JounQin
Copy link
Author

JounQin commented May 2, 2023

Workaround: export react as named export at the same time, so that the user can use import { react } from '@vitejs/plugin-react-swc'

@ArnaudBarre
Copy link
Member

The vite config is not running in node, so you should use the bundler resolution added in TS 5

@JounQin
Copy link
Author

JounQin commented May 2, 2023

The vite config is not running in node, so you should use the bundler resolution added in TS 5

It can be. Vite can be used as a server middleware.

@ArnaudBarre
Copy link
Member

yeah but the config will be bundled by Vite

@JounQin
Copy link
Author

JounQin commented May 2, 2023

yeah but the config will be bundled by Vite

It can be loaded by user manually and overrides the vite config accordingly.


This issue is about compatibility, I don't understand why you are requesting to change the tsconfig which is used by other tools at the same time.

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 a pull request may close this issue.

2 participants