The image URL in my project before the production build is working fine in VITE server environment, but after production build it isn't showing the correct path of the image in HTML. Other images are working fine except this one which is the only background image in the whole project.
Before Production
<body class="bg-[#333] overflow-x-hidden">
<header class="bg-[url('img/heroBg.jpg')] bg-cover bg-center before:content-[''] before:absolute before:top-0 before:left-0 before:w-screen before:h-[525px] before:bg-black before:z-10 before:opacity-70 w-screen h-[500px]">
After Running Production Build
<body class="bg-[#333] overflow-x-hidden">
<header
class="bg-[url('../img/heroBg.jpg')] bg-cover bg-center before:content-[''] before:absolute before:top-0 before:left-0 before:w-screen before:h-[525px] before:bg-black before:z-10 before:opacity-70 w-screen h-[500px]"
></header>
</body>
</header>
</body>
I also tried to use custom theme but it is also not working. My folder hierarchy is like this:
Img
/heroBg.jpg
Index.html
node_modules
package.json
package-lock.json
postcss.config
script.js
style.css
tailwind.config
I will be grateful of anyone helping me!