title: JavaScript file dependend on JavaScript code block in Yii2 (for dojo configuration)
body: <p>I'm trying to register the dojo javascript files with Yii 2.0.
  According to the dojo documentation, the code block for dojo config must be loaded before the actual dojo.js in order to be considered. However, in the HTML output my custom javascript code is always loaded after dojo.js.</p>
  
  <p>This is my code:</p>
  
  <pre><code>$this-&gt;registerJs('dojoConfig="async:true,isDebug:true";', $this::POS_HEAD,'dojoconfiguration');
  $this-&gt;registerJsFile('/dojo_toolkit/dojo/dojo.js', ['depends' =&gt; [\yii\web\JqueryAsset::className()], 'position' =&gt; yii\web\View::POS_HEAD]);
  </code></pre>
  
  <p>And in HTML it looks like this:</p>
  
  <pre><code>&lt;script src="/dojo_toolkit/dojo/dojo.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;dojoConfig="async:true,isDebug:true";&lt;/script&gt;
  </code></pre>
  
  <p>Any advise?</p>