Stop modifying require.extensions in the top level. #3054

wants to merge 1 commit into


None yet

4 participants

BYVoid commented Jun 29, 2013

require.extensions should not be modified in the top level. For example, variable require.extensions of a script file that loads coffee script by using var coffee = require('coffee-script') is modified unexpectedly. require.extensions should remains as-is until 'run' is explicitly called.

By implementing this, I created another script file named and moved some functions from to it. In '' the new function is named registerRequire, which replaced the code in the top level before. registerRequire is called in function run of


See #2323


Done. You now have to require coffee-script/extensions to enable 'em.

@jashkenas jashkenas closed this Oct 20, 2013

@jashkenas: Not true. You may want to check out michaelficarra/CoffeeScriptRedux@23a597e to see how I did this in CSR. Let's try to get this fixed up before 1.7.0.

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