1

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.

siddhuKantipudi
  • 303
  • 4
  • 11
  • Thanks. I think i found the answer. gulp.task('less', function () { return gulp.src([ //src files ], { cwd: "/path/.."}) .pipe(less(**{javascriptEnabled: true}**)) //function to handle error .on('error', handleError) .pipe(target/..); }); – siddhuKantipudi Mar 25 '18 at 17:19

1 Answers1

3

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/..);
});
});
siddhuKantipudi
  • 303
  • 4
  • 11