How can I load the templates from a module? I'm creating a module that contains some predefined templates. How can I load them directly out of the vendor folder? I've tried doing 

Event::on(View::class, View::EVENT_REGISTER_SITE_TEMPLATE_ROOTS, function(RegisterTemplateRootsEvent $event) {
    if (is_dir($baseDir = $this-&gt;getBasePath().DIRECTORY_SEPARATOR.'templates')) {
        $event-&gt;roots[$this-&gt;id] = $baseDir;
    }
});


That part seems to be working, cause if I dump it, I get:

[
    'my-module' =&gt; '/app/modules/mymodule/src/templates'
]


In my module, I have a templates/test.twig

But when I do mysite.com/test, I still get a 404.

I've also tried a different approach, in the routes.php, I put:

'test' =&gt; ['template' =&gt; '@modules/my-module/test'],


Still nothing.

Is there something I could differently?
Answer from @robin-schambach 

It's not possible the way you do it... or the way you are trying to do it
During site requests only templates from your template folder can be loaded
otherwise it would be a high security issue