Sha256: 0360d9ed76bc4ef1050e7c4193f49b34a8bc379ba4f44999c11b14ae5ff97a7b
Contents?: true
Size: 521 Bytes
Versions: 8
Compression:
Stored size: 521 Bytes
Contents
var browserify = require('../'); var vm = require('vm'); var test = require('tap').test; test('external', function (t) { t.plan(2); var b = browserify(__dirname + '/external/main.js'); b.external('freelist'); b.bundle(function (err, src) { if (err) return t.fail(err); vm.runInNewContext( 'function require (x) {' + 'if (x==="freelist") return function (n) { return n + 1000 }' + '}' + src, { t: t } ); }); });
Version data entries
8 entries across 8 versions & 3 rubygems