The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Gulp and Browserify - Adding Babel & Source Maps

Gulp and Browserify - Adding Babel & Source Maps

4:30
What is already a nice workflow using Gulp, Browserify, Watchify & Browsersync to enable auto rebuilds & live browser reloading can be further improved by adding Babelify. A simple wrapper around the popular transpiler Babel, Babelify can ‘transform’ source files as they pass through our stream to enable certain Javascript features not yet available in the Browser or Node. We end the lesson by looking at how to generate & extract sourcemaps using `exorcist`.
Watch this lesson now
Avatar
egghead.io

What is already a nice workflow using Gulp, Browserify, Watchify & Browsersync to enable auto rebuilds & live browser reloading can be further improved by adding Babelify. A simple wrapper around the popular transpiler Babel, Babelify can ‘transform’ source files as they pass through our stream to enable certain Javascript features not yet available in the Browser or Node. We end the lesson by looking at how to generate & extract sourcemaps using exorcist.

Avatar
Rolando

Hello, thanks for this tutorial, first time I use broswerify but even though my gulp watch is running fine I'm getting 'Uncaught ReferenceError: require is not defined' in the console, broswerify is install but doesn't work, gulp doesn't throw you any error message, I clone your repo from github and that one does actually works in my machine, why is that??

In reply to egghead.io
Avatar
Ge

It looks like the exorcist library is not actively maintained anymore, and the example does not work.

The gulp-sourcemap library is a more up-to-date choice for now but there are bugs with the source map.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?