I am trying to use image as background using tailwind css in Create react app. But can't figure out how to add background image class.
The error:
Module not found: Error: Can't resolve './src/images/pages/login.svg' in 'C:<some_project>\src'
what i tried:
backgroundImage: {
"login-image": "url('./src/images/pages/login.svg')",
},
// assumed it starts from src
backgroundImage: {
"login-image": "url('/images/pages/login.svg')",
},
// also tried to place it into public page and include like
backgroundImage: {
"login-image": "url('/images/pages/login.svg')",
},
Any help would be appreciated! Thanks