title: Symfony 4 and FOSJsRoutingBundle OK in dev env, but KO in prod env (Routing is not defined)
body: <p>From symfony 4, I used the bundle jsrouting for get symfony route path from JS code. 
  In <code>dev</code> environment all works fine, but when I set the symfony configuration to <code>prod</code> mod I get this error when I load a page where one of my javascript scrips use jsrouting : </p>
  
  <p><a href="https://i.stack.imgur.com/YsVAh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YsVAh.png" alt="enter image description here"></a></p>
  
  <p>(error occured in a custom javascript file <code>global.js</code> used by my page)</p>
  
  <p>My twig file contains theses lines : </p>
  
  <pre><code>&lt;script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"&gt;&lt;/script&gt;
  &lt;script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('build/js/us/builder/global.js') }}"&gt;&lt;/script&gt;
  </code></pre>
  
  <ul>
  <li>I set the variable <code>APP_ENV</code> to <code>dev</code> in .env file : when I load the page, from the browser debugger I see : </li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/DqqgT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DqqgT.png" alt="enter image description here"></a></p>
  
  <ul>
  <li>But if I set the variable <code>APP_ENV</code> to <code>prod</code> in .env file : when I load the page, from the browser debugger I see : </li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/vuAjh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vuAjh.png" alt="enter image description here"></a></p>
  
  <p>I don't understand why when I go to <code>prod</code> mode, these two lines : </p>
  
  <pre><code>&lt;script src="/*****/public/bundles/fosjsrouting/js/router.js"&gt;&lt;/script&gt;
  &lt;script src="/*****/public/js/routing?callback=fos.Router.setData"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>are missing...and this is why I got the error "Routing is not defined", because "Routing" is defined in the router.js file .</p>
  
  <p>I don't understand why theses lines are missing when Symfony is in the <code>prod</code> environment</p>
  
  <p>The content of my config file <code>/myproject/config/bundles.php</code> : </p>
  
  <pre><code>&lt;?php
  
  return [
      //...
      FOS\JsRoutingBundle\FOSJsRoutingBundle::class =&gt; ['all' =&gt; true],
  ];
  </code></pre>
  
  <p><strong>EDIT</strong> The output of some console commands :</p>
  
  <p><a href="https://i.stack.imgur.com/nK8OE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nK8OE.png" alt="enter image description here"></a></p>