Webpack: This relative module was not found

Created on 20 May 2018  路  3Comments  路  Source: vuejs-templates/webpack

What's wrong with url's in sass???????

`This relative module was not found:

  • ../../images/line-gray.png in ./node_modules/css-loader??ref--10-1!./node_modules/postcss-loader/lib??ref--10-2!./node_modules/sass-loader/lib/loader.js??ref--10-3!./src/assets/sass/main.
    scss`

Structure
-src
--assets
---images
---sass
----blocks
----settings
---main.scss
--components
--pages
--router
-App.vue
-main.js

In settings\_base.scss a have .dark-line {background-image: url('../../images/line-gray.png');}

resolve-url-loader also didn't help

Most helpful comment

changed url to ~@/assets/ and worked

All 3 comments

changed url to ~@/assets/ and worked

@akoboy you saved a life.
Thank you!

@akoboy it still works. Thank you!

Was this page helpful?
0 / 5 - 0 ratings