-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
feat(create-vite): tsconfig support vite.config.ts #6324
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can cover template-svelte-ts
too. We might've forgot to rename the config to vite.config.ts
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Might want to fix the typo in the PR title too 👀
hahahaha |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think PR title should be feat(create-vite): ...
Hm, I just tried this in my project and if you import something in |
you mean is you need to install "@types/node" in the project, and the "@types/node" will make the browser had error type? |
Sorry, I wasn't very clear. Basically if you import another package and that package has a dependency on In the former case, if you don't include |
thanks @NMinhNguyen. yes, your editor typescript project will no load the I think only add the vite/client reference in the |
Yeah but the thing is that |
just add |
That would introduce Node globals in the browser code, right? |
no, because |
How? Do you mean |
but it can't make the vite.config.ts support module=esnext 😢 |
I find the |
I haven't tried this but |
use tsconfig option |
Interesting! I'm on my phone atm so can't check but will check later tonight |
@poyoho I've verified and it seems to work as intended! Great work! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to complicate the setup a bit, but LGTM if it's something the end-user would eventually need to solve.
@poyoho we talked about this PR too :) This is a good approach, looks like the vue cli starter will also use the same scheme moving forward. Before merging, it would be good to try to simplify the |
Description
fix #6311
Additional context
Should we distinguish between build and editor configuration files?
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).