You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use routes in my SPA that start with /public, which triggers this warning:
files in the public directory are served at the root path.
Instead of /public/foo, use /foo.
I tried to update the publicDir in the vite configuration, but the warning remains. Regardless of my custom routes, the warning should match the configured public dir. This also means that renaming the publicDir and referencing it by it's new name does not trigger this warning, while it should.
The repro shows the warning being triggered by the '/public/foo' route that is unrelated to the public folder (which has been renamed to 'static'). It also shows the warning not being triggered when linking a manifest.json and using the publicDir in the path.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Describe the bug
I use routes in my SPA that start with /public, which triggers this warning:
I tried to update the publicDir in the vite configuration, but the warning remains. Regardless of my custom routes, the warning should match the configured public dir. This also means that renaming the publicDir and referencing it by it's new name does not trigger this warning, while it should.
Reproduction
https://github.com/dd-jonas/vite-public-dir-warning-issue
The repro shows the warning being triggered by the '/public/foo' route that is unrelated to the public folder (which has been renamed to 'static'). It also shows the warning not being triggered when linking a manifest.json and using the publicDir in the path.
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: