Skip to content

File paths embedded in generated files must be normalized #93

@yatsuna827

Description

@yatsuna827

Running the dev command on Windows produces an error like:

Internal server error: Cannot find module 'C:UsersmyaccountDocuments	ypescript
unstack-sample/src/Root.tsx' imported from 'virtual:funstack/entries'

This is caused by Windows path separators (backslashes) not being normalized before being embedded in generated files. Note that even in the error message above, \t in Documents\typescript is interpreted as a tab character.

Vite provides a normalizePath utility function and recommends its use in the plugin API documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions