How to uglify output with Browserify in Gulp?

You actually got pretty close, except for one thing: you need to convert the streaming vinyl file object given by source() with vinyl-buffer because gulp-uglify (and most gulp plugins) works on buffered vinyl file objects So you’d have this instead var browserify = require(‘browserify’); var gulp = require(‘gulp’); var uglify = require(‘gulp-uglify’); var source = … Read more

Task Runners (Gulp, Grunt, etc) and Bundlers (Webpack, Browserify). Why use together?

Grunt and Gulp are actually task runners, and they have differences like config driven tasks versus stream based transformations. Each has its own strengths and weaknesses, but at the end of the day, they pretty much help you create tasks that can be run to solve a larger build problem. Most of the time, they … Read more

How to import jquery using ES6 syntax?

index.js import {$,jQuery} from ‘jquery’; // export for others scripts to use window.$ = $; window.jQuery = jQuery; First, as @nem suggested in comment, the import should be done from node_modules/: Well, importing from dist/ doesn’t make sense since that is your distribution folder with production ready app. Building your app should take what’s inside … Read more