less.js: Imports are not updated when recompiling via the same (?) less object
bug report I write a compile tool for my project, it depend less.
my project style folder and files likes
- styles
_utils.less
index.less
and index.less
content is
@import "./utils"
I use less api to compile the less files like
let less=require('less');
//....
less.render(indexContent,options,(err,result)=>{
console.log(result.css)
});
when i change _utils.less
content , the above code will automatically execute
but since 3.0.x , when i change _utils.less
content ,the result.css
is the first time result, whatever change how many times.
but 2.7.x is ok, when i change _utils.less
content ,the result.css
also changed.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 11
- Comments: 19 (6 by maintainers)
Commits related to this issue
- Add a workaround for less caching issue (new less version) see https://github.com/less/less.js/issues/3185 — committed to noobaa/noobaa-core by nb-ohad 6 years ago
- Add a workaround for less caching issue (new less version) see https://github.com/less/less.js/issues/3185 — committed to noobaa/noobaa-core by nb-ohad 6 years ago
- Add a workaround for less caching issue (new less version) see https://github.com/less/less.js/issues/3185 — committed to noobaa/noobaa-core by nb-ohad 6 years ago
- Add a workaround for less caching issue (new less version) see https://github.com/less/less.js/issues/3185 — committed to noobaa/noobaa-core by nb-ohad 6 years ago
- chore(pipeline): downgrade to less@2.x Less 3.x has a bug that prevents the correct CSS from being generated when the `less` object in node is reused and the entry point hasn't changed (CSS changes o... — committed to HelixDesignSystem/helix-ui by deleted user 6 years ago
In Node environment, manual clear less compile cached file:
@tiodot @hawkerboy7 @TigersWay Does this branch resolve the issue? If so, I’ll make a PR - please check this out - https://github.com/matthew-dean/less.js/commits/cache-modified
@tiodot @hawkerboy7 @TigersWay Cool, the nice thing is, you should get slightly faster Less compiling with a warm cache (a 3.x feature), so it’s preferable to have it fixed; otherwise I would have suggested taking it out. Will do a PR.