Skip to content
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

Use io path join method to join a url path for url path prefix to serve static files in production mode in windows OS cause wrong url #189

Open
2 tasks done
gao-jing-xin opened this issue Dec 8, 2024 · 0 comments

Comments

@gao-jing-xin
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

5.1.0

Plugin version

7.0.1

Node.js version

22.x

Operating system

Windows

Operating system version (i.e. 20.04, 11.3, 10)

win11

Description

Use io path join method to join a url path for url path prefix (@fastify\vite\mode\production.js:50) to serve static files in the production mode in windows OS.

It leads to error in prefix url path just like "\asserts" and causes assert(path[0] === '/' || path[0] === '*', 'The first character of a path should be /or*') (find-my-way\index.js:108) to throw an Exception.

It should be changed to prefix: url.resolve(config.vite.base || '/', assetsDir), (@fastify\vite\mode\production.js:50)

Link to code that reproduces the bug

No response

Expected Behavior

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant