1

In my project I want to provide branding feature. For this purpose I'm going to include branding style in runtime. But I can't find the method how to do it via webpack. I want to write something like this:

require.ensure(['./branding/**/style.scss'], ()=> {
   require(`./branding/${brandingName}/style.scss`);
});

Can anyone help me to cope with it?

I've also tryied bundle-loaderit doesn't works for me too

require('bundle!../branding/' + branding + '.scss')(()=> {});
Andrii Tsarenko
  • 655
  • 7
  • 21
  • Webpack works fine cause it understand what dependency you put in your js code via require and get it...so have you tried to put the require('style.scss') in your js (or typescript) file? – federico scamuzzi Dec 28 '16 at 16:20
  • Possible duplicate of [What does the lazy mode of webpack dev server do?](http://stackoverflow.com/questions/34960032/what-does-the-lazy-mode-of-webpack-dev-server-do) – Paul Sweatte Jan 18 '17 at 21:37

0 Answers0