diff --git a/lib/less/import-manager.js b/lib/less/import-manager.js index 2eb029013..6a7fb1e67 100644 --- a/lib/less/import-manager.js +++ b/lib/less/import-manager.js @@ -51,7 +51,10 @@ module.exports = function(environment) { callback(null, {rules:[]}, false, null); } else { - if (!importManager.files[fullPath]) { + // Inline imports aren't cached here. + // If we start to cache them, please make sure they won't conflict with non-inline imports of the + // same name as they used to do before this comment and the condition below have been added. + if (!importManager.files[fullPath] && !importOptions.inline) { importManager.files[fullPath] = { root: root, options: importOptions }; } if (e && !importManager.error) { importManager.error = e; }