Skip to content

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

Merged
1 commit merged intobrowserify:masterfrom
esamattis:recursive-require
Mar 24, 2013
Merged

Jump to root require if module is not found from the local map#9
1 commit merged intobrowserify:masterfrom
esamattis:recursive-require

Conversation

@esamattis
Copy link
Contributor

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

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
@esamattis
Copy link
Contributor Author

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

@ghost
Copy link

ghost commented Mar 24, 2013

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

@esamattis
Copy link
Contributor Author

Yes :) or with any script loader

@ghost ghost merged commit 2c68dcb into browserify:master Mar 24, 2013
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant