Skip to content

Exception when using not default output_path #107

@zorn-v

Description

@zorn-v

Steps to reproduce:

  1. Run
composer create symfony/skeleton
cd skeleton
composer req encore twig maker doctrine/annotations
./bin/console make:cont Test
  1. Add {{ encore_entry_link_tags('app') }} in templates/base.html.twig
  2. Change output_path in config/packages/webpack_encore.yaml to %kernel.project_dir%/public/build/default
  3. Change paths in webpack.config.js
Encore
    // directory where compiled assets will be stored
    .setOutputPath('public/build/default')
    // public path used by the web server to access the output path
    .setPublicPath('/build/default')
  1. Run npm i && npm run build
  2. Run web server (e.g. php -S 8888 -t public) and open http://localhost:8888/test

And you get exeption like this
An exception has been thrown during the rendering of a template ("Asset manifest file "/var/www/html/public/build/manifest.json" does not exist.").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions