FOSJsRoutingBundle dump with baseurl

518 Views Asked by At

I use

php bin/console fos:js-routing:dump -e=prod --target="web/js/fos_js_routes.prod.js"

to dump all routes, but the problem is my production symfony not in root url.

I mean, it place in https://myshop.com/symfonyapp and all generated route dont have /symfonyapp

for example homepage to be / and what I expect is /symfonyapp/

how to set baseurl to dump all route?

1

There are 1 best solutions below

0
Julio On

You have to setup this variable in the config file:

// config/packages/fos_js_routing.yaml

fos_js_routing:
    request_context_base_url: 'symfonyapp/'