Make require("6to5/register") work with browserify

Previously, you'd have to create a separate file for using 6to5
with both node and browserify, as the latter wasn't able to properly
handle loading 6to5's dependency tree and would crash on attempting
to do so.

This change instructs browserify to use "register-browser.js" in place
of "register.js". "register-browser.js" still loads the 6to5 polyfill,
but is otherwise ignored.
This commit is contained in:
Hugh Kennedy
2015-01-02 21:21:51 +01:00
parent 5a5bf7b4ac
commit 5a01beaa1f
4 changed files with 28 additions and 0 deletions

3
test/fixtures/browserify/register.js vendored Normal file
View File

@@ -0,0 +1,3 @@
require('../../../register')({
ignoreRegex: false
});