-
Notifications
You must be signed in to change notification settings - Fork 116
Cross platform vite_import plugin #5513
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
base: main
Are you sure you want to change the base?
Conversation
alvaromateo
left a comment
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.
Just a concern regarding support for Windows and new line characters.
viteDetectImportPlugin.js
Outdated
|
|
||
| // the string has multiple lines, some of which might be blank, so split | ||
| // on newlines and filter out the empty strings | ||
| const imports = viteImports.split("\n").filter(Boolean); |
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.
In the captureString you consider support for Windows platform (brave 😂).
I believe Windows uses a different new line characters. Won't that be a problem here (and later in the .join("\n"))?
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.
Good point, splitting this way leaves a bad "\r" in the filename... Vite doesn't seem to mind but I'll add a check for this edge case. No need for "\r\n" in the .join call because that only gets printed in the console
steverydz
left a comment
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 👍
|
There are some connection time out issues when downloading ripgrep from github that can lead to builds failing. Adding "don't merge" label until I find some time to investigate |
Done
@lvce-editor/ripgrep) for cross-platform supportTesting