I am not getting background image output from the tailwind.Config.Js. Tailwind.Config.Js perfectly generate the background image but when I see the output on browser it's showing image 404 .
here is my code sample of tailwind.config.js
module.exports = {
purge: [],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {
// backgroundImage: theme => ({
// 'body-bg': "url('./../images/px1.gif')",
// })
backgroundImage: theme => ({
'hero-pattern': "url('../images/px1.gif')",
})
},
},
variants: {
extend: {},
},
plugins: [],
}
here is the webpack setup
let mix = require("laravel-mix");
mix.js("src/js/app.js", "js/app.js")
mix.css("src/css/app.css", "css/app.css")
.options({
postCss: [require("tailwindcss")],
}).setPublicPath('public')
here is the folder structure
i am getting this output css
.bg-hero-pattern {
background-image: url(/images/px1.gif?9ee64f464ce65b98bb9e4168105dc9b3);
}
output CSS should be this
.bg-hero-pattern {
background-image: url(../images/px1.gif?9ee64f464ce65b98bb9e4168105dc9b3);
}