I created an Angular application using ng new my-application command. Also I created a library in this application using ng generate library my-lib.
Here is a simple CSS code with background-image property. The image file does not exist
.class1 {
background-image: url('./not-existing-file.png');
}
If I put this CSS code in the library projects/my-lib/src/lib/my-lib.component.scss and run ng build my-lib then the library will build successfully.
But if I put this CSS code in the src folder src/app/app.component.scss and run ng build then I get error:
NonErrorEmittedError: (Emitted value instead of an instance of Error) CssSyntaxError: C:\app.component.scss:2:2: Can't resolve '../not-existing-file.png' in 'C:\angular-tour-of-heroes\src\app'
I need to disable URL checks in CSS in ng build command, like in ng build my-lib. Is it possible?