You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var gulp = require("gulp");
var browserify = require("browserify");
var source = require('vinyl-source-stream');
var gulp = require("gulp");
var bundle = browserify({
entries: ["./index.js"],
debug: true,
cache: {},
packageCache: {},
fullPaths: true
})
// If I comment out uglifyif then it works again.
bundle = bundle.transform('uglifyify', { global: true });
return bundle.bundle()
.pipe(source("main.bundle.js"))
.pipe(gulp.dest("./assets"));
Running node browserify.js breaks because node_modules/babel-core/node_modules/source-map/lib/base64-vlq.js disappears.
The text was updated successfully, but these errors were encountered:
I figured this out. The file in question does this:
(function(require){})(require)
Thus, the require is mangled in the function, and then not gotten. By blacklisting "Require" to never be mangled it solves this. However, given that this was something that took place in a dependency's dependency (and of a popular package), I think blacklisting "require" should maybe be the default behavior. OR, its possible that this is broken in that it should first grab dependencies then mangle.
index.js:
browserify.js:
Running node browserify.js breaks because node_modules/babel-core/node_modules/source-map/lib/base64-vlq.js disappears.
The text was updated successfully, but these errors were encountered: