Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Andres Suarez
    lol you're trolling me - that's adventure time
    Mauro Oviedo
    anyone in here?
    Mauro Oviedo
    I have a wuick question related to this piece of code https://github.com/jakemmarsh/angularjs-gulp-browserify-boilerplate/blob/master/gulp/tasks/browserify.js
    can someone explain to me why both browserify’s debug is set to true and why gulp-sourcemaps is being used
    when browserify’s debug is set to true is means that add a source map inline to the end of the bundle
    Hi guys
    Tim Jacobi
    is there any way to avoid browserify include an entire library when I write var lib = require('lib').Child; I actually only need Child
    Hi, I want to exclude process on my browserify config. Something like this doesn't work:
    opts: {
    detectGlobals: false,
    insertGlobalVars: ['__filename','__dirname','Buffer','global']
    Hello! Quick question about the node.js core modules available automatically by browserify. How can I find out what versions are being included? Does the version of browserify determine this, or the version of node installed locally?
    I've spent all day puzzling over why code built on one system is busted and code built on another works fine, and finally traced it back to these magic modules
    hm. no one here. well, for future readers: browserify is just pulling in its magic dependencies from its own package.json file. in other words: your version of browserify affects your bundled javascript, you can get different results from the same package.json and identical versions of package in your node_modules
    Terin Stock
    @PatrickKing if browserify is in your package.json then you'll get the same results
    but yes, the builtins used by browserify are based on the version of browserify, not of the node you're using to build
    Hello all
    hola @sandeepl337
    Hi Charles
    Risto Stevcev
    does anyone know if browserify-shim will understand dependencies that are node shimmed?
      "main": "./js/entry.js",
      "browser": {
        "jquery": "./js/vendor/jquery.js"
      "browserify-shim": {
        "jquery": "$",
        "three": "global:THREE"
      "browserify": {
        "transform": [ "browserify-shim" ]
      "dependencies": {
        "browserify-shim": "~3.2.0"
    in this (their main example), it's fetching jquery from the a js file the user maintains. I'd rather just use the browserified module and install and maintain it via npm install jquery
    but I don't know if this would work:
        "jquery-ui": {
          "depends": [
    Risto Stevcev
    I only needed to worry about jquery plugins
    Daniel Moore
    Is it better for plugin authors to push to b.pipeline or b.pipeline.get('wrap')? See: https://github.com/zoubin/factor-vinylify/pull/1#discussion_r63813785
    Alex J Burke
    Hi folks - I wonder if you could help me? I have been trying to build a bundle where a particular core module is swapped out for something else i.e. I need require('net') to return something particular after bundling. There is documentation that alludes to this being possible, but I honestly can't understand what incantation to use. I'd greatly appreciate any hints. Thanks.
    Hello, does anyone know why the process.env.NODE_ENV is undefined when browserify react with babelify transform.
    hello everyone. is there an easy way to browserify a directory of files into another directory with each soruce file being it's own destination file
    i have al ad of config files that i want to keep separate
    Matt McFarland
    If I'm understanding your problem correctly, you may be able to solve it using bulkify: https://www.npmjs.com/package/bulkify
    Bob Eagan
    Hi all, I'm trying to require some .md (markdown) files in a javascript file but not having much luck. I've installed stringify and added the transform to my gulp task but still getting a syntax error for unexpected # (which is a header in the first markdown file it is trying to require)
    any tips on where I should be looking to sort this out would be much appreciated
    David Marr
    if i wanted to bring in a module that required react, but not bundle react, whats the best approach there?
    David Marr
    or put another way:
    do you know how to have browserify not bundle in react
    and basically use the globally available version React whenever require('react') is called?
    David Marr
    but i am still seeing react bundled in
    do I need to do some manual shimming with module.exports = React or something?
    i basically want to use script tags to include react and react-dom and then have my module just use those shims
    David Marr
    put together a repo illustrating this https://github.com/marr/app
    David Marr
    having lots of trouble with browserify-shim
    i have a umd module that i'm trying to browserify
    its not changing the modules require('foo') to global['Foo']
    even though my package.json specifies browserify-shim: { 'foo': 'global:Foo' }
    do i need to target that module somehow? like browserify-shim: { 'mod': { depends: "foo" }}
    Nils Magnus Djupvik
    Hi! I'm doing a transition from using bower to rely on npm (npm scripts) only for building and bundling our apps. I'm almost there, but I struggle with images in dependant modules (in node_modules). I've tried parcelify, rework etc for the css. The css bundle is fine, but I need the images in my bundled app.
    If only there was plugin for making base64 replacement for urls in the css when bundling
    Laszlo Korte

    Hi, I am working on a pretty simple project using React with babel and browserify. I am struggling to get proper minification/uglification working.

    I already tried using minifyify and uglifyify. But there are still a lot of line breaks in the final file and overall the result seems still to large.(~300-400kb)

    When using minifyify and then apply to uglifyjs2 to the output the file size goes down to ~200kb.

    But it feels pretty redundant and does not work with watchify.

    So I guess my question is: When using babel/browserify/watchify via cli, what's the best and simplest way to do minification?

    currently my build command is:
    NODE_ENV=production browserify src/main.js -t babelify -g envify -v -p bundle-collapser/plugin -p [minifyify --no-map --uglify [ --compress [ --dead_code ] --mangle ] ] | uglifyjs -m -e -c dead_code,screw-ie8,warnings=false > build/bundle.js

    But passing all the uglify options twice feels wrong.

    I would like it to look more like:

    watchify src/main.js -t babelify -g envify -p uglify -o build/bundle.js -v
    Laszlo Korte
    Eli White
    Is there any way to profile the time spent in different transforms? My karma test suite's browserify bundle takes 4.5 minutes to compile