Skip to content

generatePageImport error handling path variable of win32 style  #440

Open
@Gehbt

Description

I tried running the example on repo in windows, an warning occurred. And vite serve is broken.

image

By tracing, It seems by the root.insert call node variable __dirname. It will return win32 style path \\unplugin-vue-router\\ , and path.join function keep the style.

image

When it written to / __vue-router/auto-routes by generatePageImport, path is converted to \unplugin-vue-router\. That caused backslash escape error.

reproduction

https://github.com/Gehbt/uvr-bug-repo1

  • go to vite.config.js
  • change join function import source to node:path

Metadata

Assignees

No one assigned

    Labels

    ♦️ need reprothe issue needs a reproduction for further investigation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions