Closed gmisa closed 6 years ago
Hi, i'm trying to set rootpath from my gulp task but it doesn't seem to be working. Am I doing anything wrong? I am using gulp-less v3.3.0
Thanks
gulp.task('less', [], function () { var env = process.argv[2]; var imagePath = ''; switch(env) { case 'localhost': imagePath = 'https://localhost/assets/'; break; case 'development': case 'production': imagePath = 'https://production/assets/'; break; } return gulp.src(config.less.src) .pipe(less({ paths: config.lessPath, rootpath: imagePath })) .pipe(gulp.dest(config.less.dest)); });
Did you confirm the output is correct using the lessc CLI?
lessc
Sorry my bad. It actually works. I changed the url('/file') to url('file') in the less file
Hi, i'm trying to set rootpath from my gulp task but it doesn't seem to be working. Am I doing anything wrong? I am using gulp-less v3.3.0
Thanks