Run app in sub directory

to run app in subdirectory set myAppSubdir to subdirectory you want

# zz_engine/webpack.config.js

.setOutputPath('public/build/')
.setPublicPath('myAppSubdir/build')
.setManifestKeyPrefix('build/')

from previous:

    // directory where compiled assets will be stored
    .setOutputPath('../asset/build/')
    // public path used by the web server to access the output path
    .setPublicPath('/asset/build')
    // only needed for CDN's or sub-directory deploy
    //.setManifestKeyPrefix('build/')

and build assets using command:

bash zz_engine/dev/bin/build_assets.sh

Temporary solution for development

if you need to make it work in subdir for development, and accept that some things may not work (assets like fonts etc embeded in CSS), you can edit file:

asset/build/entrypoints.json

and change /asset/ to /myAppSubdir/asset/

more info:

https://symfony.com/doc/current/frontend/encore/faq.html#my-app-lives-under-a-subdirectory