<p dir="auto">Kernel parameters are not parsed when importing resources in <code class="notranslate">routing.yml</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="_nested:
    resource: %kernel.config_dir%/file_name.yml"><pre class="notranslate"><code class="notranslate">_nested:
    resource: %kernel.config_dir%/file_name.yml
</code></pre></div>
<p dir="auto">It would be nice to be fixed.</p>
<p dir="auto">When using Symfony without bundles, the only thing making it difficult is that in <code class="notranslate">routing.yml</code>, you can't reference the <code class="notranslate">kernel.root_dir</code> parameter. Without this, you have to always have your resource definitions be relative to the config file, which is pretty ugly.</p>