I am trying to add image inside the Pseudo element selector 'before' on content property using 'url()', in HTML and CSS it is working fine but when I added the HTML inside react(JSX) and attached the CSS file, I am getting error as below
Failed to compile
./src/style.css (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/style.css)
Module not found: Can't resolve './ascending-sort.png' in 'D:\JAVA\Prog\My Projects\Sort Visualizer\sort-visualizer\src'
CSS code
.navbar__header::before {
position: absolute;
content: url("ascending-sort.png");
left: -40px;
top: -5px;
}
JSX
<div className="navbar__header">Sort Visualizer</div>
Is there any different way to deal with Pseudo element selectors in react.