I am working in react js,I am finding difficulties in setting background image.How to set background image path in scss?
.registerpgImage{
background:url('../../images/registerpgimage.jpeg');
background-repeat: no-repeat;
this is the error I got in console: Uncaught Error: Cannot find module "../../images/registerpgimage.jpeg"
[WDS] Errors while compiling. Reload prevented.
It sounds like you are using Webpack and it is failing and therefore not reloading. The way webpack dynamically builds everything, it needs to know where things are located. If your relative file path is correct, try writing your background style as:
background:url(require('../../images/registerpgimage.jpeg'));