javascript - How many dependencies to I need to list in nested require calls? -


i have question. have module following :

define(['jquery', 'amodule', 'anothermodule'], function () {     .... } 

lets assign above module name 'mymodule' in requirejs config file.

in other file this:

require(['myconfigfile'], function () {     require['mymodule'], function(module) {     } } 

do need require modules part of 'mymodule' definition in nested require statement well?

no,

requirejs 'translate' 'jquery', 'amodule', 'anothermodule'.

in other words, first load modules 'jquery', 'amodule', 'anothermodule' before loading 'mymodule'


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -