add global dependencies to less file for gulp, this loader would resolve absolute global file path to relative path.
$ npm install gulp-less-base-import --save-dev
var lessBaseImport = require('gulp-less-base-import');
gulp.src('./src/test/a.less')
.pipe(lessBaseImport('./base'))
.pipe(gulp.dest('./dist'));
Before:
a {
color: white;
}
After:
@import "../../base";
a {
color: white
}