You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case I don't work with js object directly, but also I couldn't set variables in less file with js functions... So I prefer use lessToJs explicitly, to form js file, then I can use nodejs and webpack power for doing different tricks:
// palette.jsconstcolors=require('./colors.json');module.exports={'@normal-color': colors['Light Black'],'@primary-color': colors['Blue'],// and all power of importing JSON to variables, or js functions and so on};
Trick with colors.json in particular, caused by the inability import es modules from react-app to webpack configuration, but it fine to import json in both...
But anyway, it would be helpful if you add option to save original comments from less file.
The text was updated successfully, but these errors were encountered:
It'll be useful to keep original comments when doing customization.
I mean in example like this, I have to use less-loader modifyVars to customize theme.. It could be like:
In this case I don't work with js object directly, but also I couldn't set variables in less file with js functions... So I prefer use lessToJs explicitly, to form js file, then I can use nodejs and webpack power for doing different tricks:
Trick with
colors.json
in particular, caused by the inability import es modules from react-app to webpack configuration, but it fine to import json in both...But anyway, it would be helpful if you add option to save original comments from less file.
The text was updated successfully, but these errors were encountered: