Answer the question
In order to leave comments, you need to log in
How to connect jQuery and plugins via gulp-rigger?
Hello!
I'm trying to include plugins with node_modules in the lib.js folder using gulp-rigger, but nothing happens.
This is how I connect to lib.js
//= ../../node_modules/jquery/dist/jquery.js
and here is an example code from gulpfile.js
gulp.task('js', function () {
return gulp.src('src/js/**/*.js')
.pipe(plumber())
.pipe(rigger())
.pipe(sourcemaps.init())
.pipe(uglify())
.pipe(sourcemaps.write())
.pipe(gulp.dest('build/js'))
.pipe(browserSync.reload({ stream: true }));
});
Answer the question
In order to leave comments, you need to log in
Most likely an error in the connection path, but otherwise this is not the best way to include libraries in the project. Why do you not like storing jquery.js in the main folder with js? And you can also connect gulp-rigger to the main js file if you want to compile everything into one file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question