title: Symfony 4 - Webpack-encore use FosJsRouting : Routing is not defined
body: <p>I try to use FosJsRouting with Webpack-encore in my Symfony 4 project.</p>
  
  <p>I did :</p>
  
  <p>1.</p>
  
  <pre><code>composer require friendsofsymfony/jsrouting-bundle
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>php bin/console assets:install --symlink public
  </code></pre>
  
  <p>3.</p>
  
  <pre><code>php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
  </code></pre>
  
  <p>And in my <strong>app.js</strong> :</p>
  
  <pre><code>// FosJsRouting
  
  const routes = require('../../public/js/fos_js_routes.json');
  import Routing from '../../vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js/router.min.js';
  Routing.setRoutingData(routes);
  </code></pre>
  
  <p>Now, if in the <strong>app.js</strong> I do a <code>console.log(Routing);</code> I get the object in the console.</p>
  
  <p>On the other hand, impossible to use it in my templates.</p>
  
  <p>I have the following error:</p>
  
  <blockquote>
    <p>Uncaught ReferenceError: Routing is not defined</p>
  </blockquote>
  
  <p>I do not understand because my other packages work very well, but not the Routing</p>