I'm using webpack to concatenate JS libraries and JS files of my own. Currently the setup is like this
var wpStream = require('webpack-stream')';
var files = ['jquery.js', 'angular.js', 'app.js', 'controller.js', 'etc.js'];
gulp.task('pack', function(){
return gulp.src(files)
.pipe(wpStream({
output:{filename: 'bundle.js'}
}).pipe(gulp.dest('dist'));
});
This works well. My file is created and it has all of the content specified in my files
array. However on page load, I get the error jQuery is not defined
. Additionally, in my console when I type jQuery
there is not jQuery, but rather jQuery111206520785381790835
. And when I append a dot to see the list of methods, there's just the normal object methods (hasOwnProperty
, toString
, etc).