A
A
Andrey Neumyvanny2020-08-26 17:53:55
JavaScript
Andrey Neumyvanny, 2020-08-26 17:53:55

How to setup paths inside scss for Webpack?

Faced such a problem, for certain blocks you need to make a background via url
Like this:

.container-form-registration {
  height: auto;
  background: url(assets/img/bg-header.png) no-repeat bottom;
  background-size: cover;
}


Here is my Webpack config, it is divided into 3 parts
. , as soon as we remove this slash, everything is fine right away. But!! if you do this during the build, it doesn't matter DEV or BUILD throws this error . I checked the config, I can't figure out how to set the correct path. I use the PUG template engine, but there I just write the image path without / at the beginning and everything works fine. Help!!!!!!!







5f46771315a68190230210.png


Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question