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

feat: simple typescript support #51

Closed
wants to merge 3 commits into from
Closed

Conversation

underfin
Copy link
Member

@underfin underfin commented May 4, 2020

fix #6

@yyx990803
Copy link
Member

yyx990803 commented May 5, 2020

This is great, but I think TS's transpilation itself is too slow for dev purposes, especially for a speed-focused dev. server like vite. There are a number of alternative (and much faster) TS -> ESnext compilers available (e.g. Surcrase, esbuild, swc) and I'm still researching what is the best compiler to use in vite.

@trusktr
Copy link

trusktr commented May 5, 2020

Also, what's the expected result when TypeScript is being used? Should the server only strip types, and we leave the type checking to an IDE? Or should the server send back 500 errors (or something) to help the dev experience in catching type errors?

@bekalshenoy
Copy link
Contributor

Time To Close This PR

@zzetao
Copy link
Contributor

zzetao commented May 6, 2020

I noticed the latest code uses esbuild, for what reason?
@yyx990803

@underfin
Copy link
Member Author

underfin commented May 6, 2020

@zzetao support minification with esbuild

# Conflicts:
#	src/node/server.ts
#	src/node/serverPluginVue.ts
@underfin
Copy link
Member Author

underfin commented May 6, 2020

@zzetao .Sorry. I pull the code just now.Look like esbuild is already integrated.

@yyx990803
Copy link
Member

Closing since we are using esbuild which is faster. It also aligns better with vite's transpile-only scope.

@yyx990803 yyx990803 closed this May 7, 2020
@underfin
Copy link
Member Author

underfin commented May 7, 2020

@yyx990803 . I change my pr code with use esbuild yesterday, Maybe you are not pay attention to this.and I find ts still not suppoted after I pull the master code just now.

@yyx990803
Copy link
Member

Oh I didn't realize - but it should actually be fixed already. The rewrite happens after TS transpilation and the logic doesn't need to be duplicated. TS file extension resolution had a bug that is now fixed in ca421cd

@underfin underfin deleted the ts branch May 18, 2020 03:03
antfu pushed a commit that referenced this pull request Oct 29, 2021
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.

Allow typescript
5 participants