v9.5.0 BasePath is effecting public folder
See original GitHub issueBug report
Describe the bug
BasePath is effecting public folder A clear and concise description of what the bug is. I have Updated 9.4.2 ->9.5.0,Importing the images from public folder into components Add basepath in next.config.js
module.exports = {
basePath: '/docs',
}
Before Image Path
/static/logo/sample.png
After ImagePath
/docs/static/logo/sample.png
It should should affect only url.
- OS: [e.g. macOS, Windows]
- Browser (if applies) [e.g. chrome, safari]
- Version of Next.js: [e.g. 9.5.0]
- Version of Node.js: [e.g. 12.8.3]
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Some of public folder assets is not accessable when ...
I'm using /m basePath on this web application, and everything works great, except some files under the public folder are not accessible like ......
Read more >Deprecate file_directory_temp() and move to FileSystem service
Problem/Motivation file_directory_temp() is a procedural function in file.inc and contains some interesting logic.
Read more >upstart bug fix update - Oracle Linux Yum Server
This update is available via the Unbreakable Linux Network (ULN) and the Oracle Public Yum Server. Details on how to use ULN or...
Read more >Switching from CentOS 8 to Red Hat 8 - dbi Blog
Complete! For actually converting the system to Red Hat Enterprise Linux you need access to the Red Hat portal and an active subscription...
Read more >Next.js Redirect from / to another page - Stack Overflow
In NextJs v9.5 and above you can configure redirects and rewrites in ... configurations that may affect routing, for example next-images.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@timneutkens ok,But in next.js documentation, basepath will effect only url. not project/directory structure.
https://nextjs.org/docs/api-reference/next.config.js/basepath
@timneutkens This is a valid point. Only thing breaking is public folder assets. @Manikanta-20 Practically you should use
${BASE_PATH}/image.png
to avoid future break downs in case basepath changes.