thlorenz / proxyquireify

browserify >= v2 version of proxyquire. Mocks out browserify's require to allow stubbing out dependencies while testing.
MIT License
152 stars 24 forks source link

Prelude gets added to JSON files #7

Closed jmerrifield closed 10 years ago

jmerrifield commented 10 years ago

I'm working on a project which uses browserify to inline JSON files (e.g var config = require('config/app-config.json)).

proxyquireify appears to add the prelude to the beginning of each JSON file, making it invalid and therefore breaks in the downstream build process.

Is there a way to prevent proxyquireify from adding the prelude to JSON files?

thlorenz commented 10 years ago

That should definitely be fixed since we now check specifically for .js files before we transform. Could you please verify?