vin's avatar
Level 6

Can't locate images

in app.scss i have the following

$path: "public/images";
@import "./modules/Admin/Assets/css/style.scss";

Inside style.scss i have something like this:

background:url(#{$path}/slider_pagination.png)

It seems it can't find the images at all, the error shown also kinda tells that file-loader is not being called at all

ERROR in ./~/css-loader!./~/postcss-loader!./~/resolve-url-loader!./~/sass-loader/lib/loader.js?{"precision":8,"outputStyle":"expanded"}!./modules/Admin/Assets/application/sass/app.scss
Module not found: Error: Can't resolve './modules/Admin/Assets/images/days-left.png' in '/Users/xxxx/Sites/test/modules/Admin/Assets/application/sass'
 @ ./~/css-loader!./~/postcss-loader!./~/resolve-url-loader!./~/sass-loader/lib/loader.js?{"precision":8,"outputStyle":"expanded"}!./modules/Admin/Assets/application/sass/app.scss 7:202726-202782
 @ ./modules/Admin/Assets/application/sass/app.scss
 @ multi ./modules/Admin/Assets/application/js/app.js ./modules/Admin/Assets/application/sass/app.scss

file loader never gets called as it seems even though it should.

When it does compile does it just reference the $path in the compiled CSS?

Any idea why this does not work?

Thank You.

0 likes
1 reply
vin's avatar
vin
OP
Best Answer
Level 6

Never mind, it was just not loading from the correct path.

Please or to participate in this conversation.