I have the following Webpack config (roughly, it has been simplified for this post):
const rootPublic = path.resolve(\'./public\');
const LOCAL_IDENT_NAME = \'lo
With webpack 2:
In your .scss files use ~ before the path.
.yourClass {
background: url('~img/wallpaper.png');
}
Make use of the resolve root from webpack, add this to your webpack.config.js:
resolve: {
modules: [
path.resolve(root),
'node_modules'
]
},
It should work also for the @import, eg @import "~otherfile.scss"