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

Jump to root require if module is not found from the local map #9

Merged
merged 1 commit into from Mar 24, 2013

Conversation

Projects
None yet
2 participants
@epeli
Contributor

epeli commented Mar 23, 2013

Ok, another take on browserify/browserify#341

With this it shouldn't matter in which order multiple bundles are added
to the dom. If local require fails to find the module from its map it
jumps the to current root require in the global scope and works its way
back down from there.

Example usage https://github.com/epeli/lazy-browserify/blob/master/both.js

Jump to root require if not found.
With this it shouldn't matter in which order multiple bundles are added
to the dom. If local require fails to find the module from its map it
jumps the to current root require in the global scope and works its way
back down from there.

Should fix browserify/browserify#341
@epeli

This comment has been minimized.

Show comment
Hide comment
@epeli

epeli Mar 24, 2013

Contributor

I've updated the pull request. It's now simpler and all tests pass on browser-pack and browserify modules.

Contributor

epeli commented Mar 24, 2013

I've updated the pull request. It's now simpler and all tests pass on browser-pack and browserify modules.

@substack

This comment has been minimized.

Show comment
Hide comment
@substack

substack Mar 24, 2013

Collaborator

With this patch head.js can natively load browserify bundles? If so that is really impressive.

Collaborator

substack commented Mar 24, 2013

With this patch head.js can natively load browserify bundles? If so that is really impressive.

@epeli

This comment has been minimized.

Show comment
Hide comment
@epeli

epeli Mar 24, 2013

Contributor

Yes :) or with any script loader

Contributor

epeli commented Mar 24, 2013

Yes :) or with any script loader

@substack substack merged commit 2c68dcb into browserify:master Mar 24, 2013

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