-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node Less.js wrongly caches @imported file content between builds #3253
Comments
Also, here's a macOS The global LESS instance doesn't even try to open
|
Another workaround: less.environment.fileManagers.forEach((fileManager) => {
if (typeof fileManager.contents === 'object') {
fileManager.contents = {};
}
}); prior to compilation. |
Have you checked Less 3.5 beta 5? I believe this is a duplicate of a reported (fixed) issue, but I’m not at my PC. Please see if it’s addressed in the latest beta release.
… On Jul 2, 2018, at 10:09 AM, Aarni Koskela ***@***.***> wrote:
Another workaround:
less.environment.fileManagers.forEach((fileManager) => {
if (typeof fileManager.contents === 'object') {
fileManager.contents = {};
}
});
prior to compilation.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@matthew-dean Ah, yeah, I found #3185 / #3219 now. Looks like this issue is indeed a duplicate and probably will be fixed in that version... |
👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Heya,
I've just bumped into an intriguing problem which smells like Less.js caching
@import
ed files between builds.I have a chokidar-based watcher for LESS – nothing spectacular. Today I noticed that my stylesheets weren't getting updated when I edited an
@import
ed file; Chokidar picks up on the change and has LESS rebuild the files, but the hashes remain the same. The guts of that watcher ended up in the minimal repro project you can find at https://github.com/akx/less-cache-bug .The repro project basically creates an included file, compiles to CSS and prints the result's hash, edits the included file, compiles and prints the hash again. The hash should naturally change between the compilations, and it does not. There is no mention of a cache for the Node compiler anywhere in the docs, so I'll assume this is a bug.
However, it looks like you can work around this by creating your own LESS compiler instance (as
less/lib/less-node
does for each run.EDIT: The same problem appears if the LESS compiler instances share the
FileManager
/URLFileManager
objects, so it's gotta be them.This is the output of the repro project:
The text was updated successfully, but these errors were encountered: