Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3924

How to override the "public" directory?

$
0
0

I've renamed my public directory into www so as the documentation says I've added some line in composer.json file:

"extra": {
    "...": "...",
    "public-dir": "www"
}

Then I ran composer update.

But it seems not to work.

I have this error :

An exception has been thrown during the rendering of a template ("Asset manifest file "*******/public/build/manifest.json" does not exist.").

So I've added in config/packages/dev/framework.yaml (I'm on dev):

framework:
    assets:
        json_manifest_path: '%kernel.project_dir%/www/build/manifest.json'

But another error has appeared:

An exception has been thrown during the rendering of a template ("Could not find the entrypoints file from Webpack: the file "*******/public/build/entrypoints.json" does not exist.").

Then I modify webpack.config.js file like this :

Encore
    // directory where compiled assets will be stored
    .setOutputPath('www/build/')

But the error is still there.

Is there a simple way to rename the public directory?


Viewing all articles
Browse latest Browse all 3924


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>