I work with angular cli and webpack. I have code to change the webpack_require .p variable at runtime, but when the application compiles the scss files, it does not use the new webpack_require .p value, and the image in css does not load.
This works fine with angular cli version 1.6.7, but now I'm using version 1.7.2 and not working: below is my code:
declare var __webpack_require__: any; __webpack_require__.p = newValue;
My scss file looks like this:
.className { background: url(../../../dir1/dir2/images/imageName.jpg) no-repeat; }
UPDATE: Using the CLI version 1.7.3 does not fix the problem. Other resources work just fine, but not scss background url image.
source share