Skip to content


Subversion checkout URL

You can clone with
Download ZIP


add dummy "fs" module for component #41

tj opened this Issue · 7 comments

4 participants

tj commented

otherwise the new inline one will fail


If we add 'async' to this then we could even create a dummy 'fs' module that does inlining via ajax, but that's probably a really bad idea.


The inline plugin caused browserify to fail; I commented out the inline plugin and everything works great.

Note: when I try to build a standalone version (make), I get

failed to lookup "rework"'s dependency "visionmedia-css"

isn't there an fs module in browserify? i thought it duplicates all the core node modules in the browser.


#67 for you @DTrejo

The built file won't work, but at least it'll build.


Thanks man!

Somehow the readfilesync call on a non-JS file made browserify choke. I didn't want to depend on brfs, so I just commented out that plugin.

You might use brfs to inline files for you, then the dummy fs module could just look at the inlined files. Something like that who knows.



When you use brfs, the calls to fs.readfileSync just disappear, so the dummy fs module just needs to export {} or undefined like it does in browserify. @visionmedia may feel that AST transformations using brfs is too much magic, I don't know.

P.S. if you switched to using my module rfile you could use the rfileify transfrom, which doesn't even require any shim to be available on the client since it removes all calls to require('rfile').

Neither brfs, nor rfileify have any dependency on npm, so they'd be equally valid in a component environment. The only downside is that both currently have a streaming interface (something I may well fix in a future version of rfileify).

tj commented

yeah I dont want any preprocessing steps here, even if we just try/catch it for now so it doesn't fail that's fine, it would be really silly to use inline() on the client

@tj tj closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.