Add support for require.main #234

Gozala opened this Issue Nov 1, 2012 · 4 comments

3 participants


I would really love to have support for require.main === module that works on node.


@substack Would you accept a patch that adds that ?

@sokra sokra referenced this issue in webpack/webpack Feb 12, 2013

Add support for require.main #64


I haven't seen this come up much in modules I load from npm. Is this a big issue? require.main doesn't work as well with v2 since there might be multiple bundles.

@substack substack closed this Feb 22, 2013

👍 would like to see this too.


I figured out a hack for this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment