-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
generatePageImport
error handling path variable of win32 style
#440
Comments
generatePageImport
may broken in win32generatePageImport
error handling path variable of win32 style
AFAIK shouldn’t this just work? Or maybe I could use the join from pathe |
If the path as string, it can work, but it has been written to a file. Backslashes are transformed. For a Win32-style path, should prepare |
By the example of playground
In windows, Like '\n' be newLine, the generated code be:
the backslashes transform do wrong. If kept the Win32-style path, the filepath should be transformed into a raw string.
|
A reproduction will still help for this. I don't have a windows to test right now thought |
OK, I will do. |
A reproduction is provided |
I tried running the example on repo in windows, an warning occurred. And vite serve is broken.
By tracing, It seems by the
root.insert
call node variable__dirname
. It will return win32 style path\\unplugin-vue-router\\
, andpath.join
function keep the style.When it written to
/ __vue-router/auto-routes
bygeneratePageImport
, path is converted to\unplugin-vue-router\
. That caused backslash escape error.reproduction
https://github.com/Gehbt/uvr-bug-repo1
vite.config.js
join
function import source tonode:path
The text was updated successfully, but these errors were encountered: