webpack - require() inside require()'d file -
my webpack config compiles .scss files css in pretty standard way:
{ test: /\.scss$/, exclude: /(node_modules|bower_components)/, loaders: ['style', 'css', 'sass'] }
what i'd do, though, have url , file loaders work inside *.scss files, end goal of inlining smaller images:
&.backdrop { background-image: require('../../assets/images/backdrop-1.jpg'); }
it seems webpack ignoring require() call, though, css results identical code above (i.e. browser told try , render background image found @ require('../../' [etc etc]
. loader i've been trying above:
{ test: /\.jpg$/, loader: 'url', query: { limit: 250000 } }
can suggest i'm going wrong?
Comments
Post a Comment