Gulp: Enable Inline Javascript in Less

3.4k Views Asked by At

i am using front end build process with gulp. As a part of my less compiler, i am getting this error " Inline JavaScript is not enabled. Is it set in your options?". Found this solution for Webpack. I am trying to find a solution for gulp config. Enable inline javascript in LESS

Any help appreciated. Thank you.

1

There are 1 best solutions below

0
siddhuKantipudi On

Thanks. I think i found the answer.

gulp.task('less', function () {
  return gulp.src([src/..], { cwd: "/path/.."})
   .pipe(less({javascriptEnabled: true}))
   .on('error', gutil.log(gutil.colors.red('[Error]'), error.toString());)
   .pipe(target/..);
});
});