javascript - What is `_dereq_()` inside React? -


i'm searching through react-0.13.3.js , 1 thing can't work out. @ start of source there's bunch of dereq() calls.

'use strict';  var eventpluginutils = _dereq_(19); var reactchildren = _dereq_(32); var reactcomponent = _dereq_(34); var reactclass = _dereq_(33); 

but see implementation function. , how work? , importantly, declared?

update

i'm still waiting more comprehensive answer accept. main question what _dereq_ function , how work.

this derequire combined browserify (or other bundler?) module ids. it's way rename require in output bundle avoid collisions.

read here more information: https://github.com/calvinmetcalf/derequire/issues/25

the basic idea different module loaders handle require differently. "derequire" strategy binding requires context via different keyword.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -