fix: Use lower case filenames for types so they can be imported correctly on Linux#9827
fix: Use lower case filenames for types so they can be imported correctly on Linux#9827Princesseuh wants to merge 1 commit intovitejs:mainfrom
Conversation
…ctly in triple-slash directives
|
Thanks for the PR @Princesseuh! The current file names are part of Vite's API so I'm trying to think how we can make this change without breaking downstream projects. See for example https://vitejs.dev/guide/api-plugin.html#client-server-communication Maybe we could keep the previous files and point in them to the new ones? If there is a way to make this work, we could release this as a non-breaking change in 3.1 and state that the old files will be removed in Vite 4. |
While we can do that successfully (as far as I can tell) for most of the files, we can't do this for I'm not too sure how to achieve this, hmm. I don't necessarily mind this being a breaking change, fwiw. We (Astro) and other frameworks can fairly easily duplicate the file manually in our repos for now as a workaround |
|
I'll add this PR to be discussed in a future team meeting. Maybe it is enough to do this change in a minor, but if not, we could do it in Vite 4 that isn't that far away (probably a few months from now) |
I think this would be the way for now too. I also think that this is a breaking change that we should do for Vite 4. Also looks like microsoft/TypeScript#45096 is marked in TS 4.8 milestone (though 4.8 is already released). Perhaps it might be resolved soon. |
|
Ok, let's target v4. I removed it from the meeting discussion for now. |
|
@Princesseuh would you help to test @sapphi-red's #9966? Looks like we could resolve this issue without waiting until Vite 4. |
Description
Due to an issue in TypeScript (microsoft/TypeScript#45096), files using uppercased characters can't be imported through a triple slash directive
typeson Linux.This is normally not an issue, because Vite refers to those types exclusively using
path(since #4031), however it's an issue for third-party projects who needs to refers to those types usingtypes. Example issue from the Astro repo: withastro/astro#4387Additional context
This should be all, don't hesitate if there's anything I missed!
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).