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

Change module caching behavior in prelude.js #180

Merged
1 commit merged into from
Jun 27, 2012
Merged

Conversation

jhnns
Copy link
Contributor

@jhnns jhnns commented Jun 27, 2012

I noticed that browserify manages the module caching slightly different compared to nodejs. nodejs provides a cache-object attached to require() as described here. Thus a module can decide to reload another module.

In order to write modules that run in both environments browserify should do it like node.

As you can see in the attached code it's not necessary to change a lot. Unfortunately I couldn't find a place to write tests for it, but it seems like it doesn't break the old tests.

@ghost ghost merged commit cf1cbcf into browserify:master Jun 27, 2012
@ghost
Copy link

ghost commented Jun 27, 2012

Thanks for the patch! I added a test and only had to modify the alias test slightly for some reason, but in a way that didn't seem important.

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
Development

Successfully merging this pull request may close these issues.

1 participant