browserify / factor-bundle

factor browser-pack bundles into common shared bundles
Other
402 stars 27 forks source link

factor-bundle fails to map entry and output files #23

Closed madebyherzblut closed 10 years ago

madebyherzblut commented 10 years ago

When I try to run browserify (version 5.9.1) + factor-bundle (version 1.0.0) with the following command:

./node_modules/.bin/browserify client/index.js client/modules/plan.js -p [ factor-bundle -o build/index.js -o build/plan.js ] \
  -o build/common.js

I get the following error:

[path]/node_modules/factor-bundle/index.js:48
        var fileMap = files.reduce(function (acc, x, ix) {
                            ^
TypeError: Cannot call method 'reduce' of undefined
    at f ([path]/node_modules/factor-bundle/index.js:48:29)
    at Browserify.plugin ([path]/node_modules/browserify/index.js:208:9)
    at [path]/node_modules/browserify/bin/args.js:99:15
    at Array.forEach (native)
    at module.exports ([path]/node_modules/browserify/bin/args.js:94:10)
    at Object.<anonymous> ([path]/node_modules/browserify/bin/cmd.js:6:26)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
acdlite commented 10 years ago

+1

orourkedd commented 10 years ago

+1

terinjokes commented 10 years ago

factor-bundle v1 only supports browserify v4. Upgrade factor-bundle to v2 for browserify v5 compatibility.