browserify / factor-bundle

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

No transforms done on the input files, so you can't use coffee, reactify, etc ... #31

Closed Pita closed 10 years ago

Pita commented 10 years ago

It always blows up in my case with the error message provided below. That part of the code where it fails to parse is jsx (react) code. I added reactify as a transformer to the bundle, but it seems to look for requires in the code, before running it through reactify.

Error: Parsing file /home/pita/Code/admin-dashboards/static/scripts/src/ontology/blueprint/item.jsx: Line 167: Unexpected token .
    at Deps.parseDeps (/home/pita/Code/onefinegulp/node_modules/browserify/node_modules/module-deps/index.js:360:28)
    at fromSource (/home/pita/Code/onefinegulp/node_modules/browserify/node_modules/module-deps/index.js:303:48)
    at /home/pita/Code/onefinegulp/node_modules/browserify/node_modules/module-deps/index.js:298:17
    at ConcatStream.<anonymous> (/home/pita/Code/onefinegulp/node_modules/browserify/node_modules/concat-stream/index.js:32:43)
    at ConcatStream.EventEmitter.emit (events.js:117:20)
    at finishMaybe (/home/pita/Code/onefinegulp/node_modules/browserify/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:460:14)
    at endWritable (/home/pita/Code/onefinegulp/node_modules/browserify/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:469:3)
    at ConcatStream.Writable.end (/home/pita/Code/onefinegulp/node_modules/browserify/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:436:5)
    at DuplexWrapper.onend (/home/pita/Code/onefinegulp/node_modules/browserify/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js:537:10)
    at DuplexWrapper.g (events.js:180:16)
Pita commented 10 years ago

it seems to work if you pass global:true as a transformation option. Not sure if thats intended

terinjokes commented 10 years ago

This doesn't seem like a factor-bundle issue, as we don't change how any of the module-deps parsings are done (and we run with hbsfy transforms just fine).

Can you make a reproducible test case?

Pita commented 10 years ago

it was my mistake, don't worry about it