How to connect a JS-script (ES5/6...) using Gulp?

In short, there is a task in gulpfile which collects in a single file third-party libraries:
gulp.task('vendor', function() {
 var src = [
'node_modules/jquery/dist/jquery.min.js',
'node_modules/lodash/lodash.min.js',
'node_modules/vue/dist/vue.min.js',
'node_modules/vue-resource/dist/vue-resource.min.js',
'node_modules/blockui-npm/jquery.blockUI.js',
'node_modules/sweetalert/dist/sweetalert.min.js',
'node_modules/moment/min/moment.min.js',
'node_modules/sprintf-js/dist/sprintf.min.js',
];

gulp.src(src)
.pipe(concat('vendor.build.js'))
.pipe(gulp.dest('public/js'));
});

Thank the gods this out!
But there is a need to use a library from node_modules, but with these sorts exports, require and other game latest JS syntax... How to implement this script in my js file?
March 12th 20 at 07:59
2 answers
March 12th 20 at 08:01
Thank the gods this out!

To anyone else it don't show.

But there is a need to use a library from node_modules, but with these sorts exports, require and other game latest JS syntax... How to do it correctly in my case?

Or examine "all of these exports, require and other game", or looking for a job easier.

Than you can collect bundle:
webpack
browserify
Believe me. Backender not easy to the hang of this anarchy, which occurred with a frontend, which is not watched already like 5 years.
But that's not it. I do not really believe so as to connect any such library (or right module) you need to build a refinery and next to another to build a metropolis. Must be an easier way, maybe... - Cleta commented on March 12th 20 at 08:04
What is a bundle? Chew, please. - Cleta commented on March 12th 20 at 08:07
@Cleta, the easiest way to use the UMD libraries. And there is nothing to learn don't have to. But now hardly anyone does.

If you want to make the Assembly(bundle), you need to use a collector. For convenient development as well devServer will need to replace modules on the fly without reloading the page.
Suggest for these tasks to use the webpack, it's the gold standard in frontend development.
Read the lessons vue.js read the documentation. Try the vue-cli. - katlynn commented on March 12th 20 at 08:10
March 12th 20 at 08:03
Use webpack
An example of how to use webpack with gulp

Find more questions by tags Gulp.jsJavaScript