Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alternative configuration method #175

Closed
dominictarr opened this issue Jun 20, 2012 · 1 comment
Closed

alternative configuration method #175

dominictarr opened this issue Jun 20, 2012 · 1 comment

Comments

@dominictarr
Copy link
Contributor

another response to #132

require only takes a single argument,
so what if supplying a second argument was a directive to browserify?

this would give us the desired configurability, and the advantage over #174
is that the configuration would fall in front of you eyes, not off in a file where you
would forget about it.

//load './client' when bundling for client side.
var server       = require('./server', './client')   

//ignore './server-only' when bundling for client side
var onlyServer = require('./server-only', null) 

I'm not sure how everyone feels about adding a second argument, but I think, all things considered,
this might be the cleanest, easiest to use method.

@isaacs has stated that the module system is "finished", and I think he's pretty serious,
so it's unlikely that it would suddenly start behaving differently with a second argument.

@ghost
Copy link

ghost commented Feb 22, 2013

This functionality is now handled by the browser field.

@ghost ghost closed this as completed Feb 22, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant