0

I am using Webpack 3 with LESS-loader. I know LESS-Loader compiles the less file to CSS file. But As I am new to Webpack, I don't know how can I keep the LESS variable as it is and later modify it with JavaScript.

I had used ModifyVar and passed it using webpack and it worked. However I want to dynamically change the CSS. Like Server will send me the path of Theme CSS (Updated Variable values) and I will import it using LESS + JS.

Any help will be appreciated. I had search over Google as well as StackOverflow, In case of duplicate please comment and give me the correct URL.

Rajiv Pingale
  • 995
  • 9
  • 27
  • the compilation from less to sass happens at build time. You could compile that sending a http request and return the bundle with http as well. Be prepared because that is too much of a burden – PlayMa256 Sep 18 '18 at 12:39
  • Yes, but once the bundling is done, I can not update the CSS Variables. I need solution post bundling. Thanks. – Rajiv Pingale Sep 19 '18 at 05:31
  • Well, there is none. You can't do that post-bundle. – PlayMa256 Sep 19 '18 at 11:14

0 Answers0