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
Sometimes we have a less library maybe called lib.less. and in other project (called A) we can use the lib.less as base-mixins, but when we compile the less files in A , we could have to parse the lib.less for many times according to the mount of less files in project A.
Is there any methods that we could cache the parsed result of lib.less, so we can prompt the performance of compiling less files.
I had tried to use vistors to modify the root object, but it seems to be too complicated.
The text was updated successfully, but these errors were encountered:
Less already caches the parsed AST, keyed on the resolved URL of the file. (It can lead to some weird stuff on Windows with case-insensitive file names vs. case-sensitive cache keys, actually. Hehe. ^_^ )
What Less doesn't cache is the transformed output of those imported files, i.e. , their compile step. It cannot do that because of how the language scoping rules, execution order and features like dynamic imports (imports using variable replacer tokens) interplay in a way that the same file imported in different places could have a different compiled result because of other imports that preceeded it.
Sometimes we have a less library maybe called lib.less. and in other project (called A) we can use the lib.less as base-mixins, but when we compile the less files in A , we could have to parse the lib.less for many times according to the mount of less files in project A.
Is there any methods that we could cache the parsed result of lib.less, so we can prompt the performance of compiling less files.
I had tried to use vistors to modify the root object, but it seems to be too complicated.
The text was updated successfully, but these errors were encountered: