diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 4bd247ba978..70be4546830 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -1534,6 +1534,68 @@ package: If you request an asset that is *not found* in the ``manifest.json`` file, the original - *unmodified* - asset path will be returned. + +json_manifest_allow_missing +........................... + +**type**: ``boolean`` **default**: ``false`` + +If set the true and the manifest file is *not found*, no error will be thrown. + +This option can only be set globally: + +.. configuration-block:: + + .. code-block:: yaml + + # config/packages/framework.yaml + framework: + assets: + # this manifest is applied to every asset (including packages) + json_manifest_allow_missing: true + bar_package: + # this package uses the global manifest (the default file is used) + base_path: '/images' + + .. code-block:: xml + + + + + + + + + + + + + + .. code-block:: php + + // config/packages/framework.php + $container->loadFromExtension('framework', [ + 'assets' => [ + // if the manifest is missing nothing will be return + 'json_manifest_allow_missing' => 'true', + 'packages' => [ + 'bar_package' => [ + // this package uses the global manifest (the default file is used) + 'base_path' => '/images', + ], + ], + ], + ]); + +.. versionadded:: 4.3 + + templating ~~~~~~~~~~