Skip to content
Advertisement

Can`t resolve image.png in styles.css

Webpack cant build the project, because cant resolve image.

Project structure

JavaScript

Here is webpack.config.js

JavaScript

and main.css

JavaScript

Error message

JavaScript

Advertisement

Answer

Seems like url() should take a string as a parameter see here

So try in main.css (and make sure that the relative path to bg.png file from main.css one is correct):

JavaScript
Advertisement