@@ -1927,10 +1927,11 @@ json_manifest_path
19271927
19281928**type **: ``string `` **default **: ``null ``
19291929
1930- The file path to a ``manifest.json `` file containing an associative array of asset
1931- names and their respective compiled names. A common cache-busting technique using
1932- a "manifest" file works by writing out assets with a "hash" appended to their
1933- file names (e.g. ``main.ae433f1cb.css ``) during a front-end compilation routine.
1930+ The file path or absolute URL to a ``manifest.json `` file containing an
1931+ associative array of asset names and their respective compiled names. A common
1932+ cache-busting technique using a "manifest" file works by writing out assets with
1933+ a "hash" appended to their file names (e.g. ``main.ae433f1cb.css ``) during a
1934+ front-end compilation routine.
19341935
19351936.. tip ::
19361937
@@ -1951,6 +1952,8 @@ package:
19511952 assets :
19521953 # this manifest is applied to every asset (including packages)
19531954 json_manifest_path : " %kernel.project_dir%/public/build/manifest.json"
1955+ # you can use absolute URLs too and Symfony will download them automatically
1956+ # json_manifest_path: 'https://cdn.example.com/manifest.json'
19541957 packages :
19551958 foo_package :
19561959 # this package uses its own manifest (the default file is ignored)
@@ -1972,6 +1975,8 @@ package:
19721975 <framework : config >
19731976 <!-- this manifest is applied to every asset (including packages) -->
19741977 <framework : assets json-manifest-path =" %kernel.project_dir%/public/build/manifest.json" >
1978+ <!-- you can use absolute URLs too and Symfony will download them automatically -->
1979+ <!-- <framework:assets json-manifest-path="https://cdn.example.com/manifest.json"> -->
19751980 <!-- this package uses its own manifest (the default file is ignored) -->
19761981 <framework : package
19771982 name =" foo_package"
@@ -1991,6 +1996,8 @@ package:
19911996 'assets' => [
19921997 // this manifest is applied to every asset (including packages)
19931998 'json_manifest_path' => '%kernel.project_dir%/public/build/manifest.json',
1999+ // you can use absolute URLs too and Symfony will download them automatically
2000+ // 'json_manifest_path' => 'https://cdn.example.com/manifest.json',
19942001 'packages' => [
19952002 'foo_package' => [
19962003 // this package uses its own manifest (the default file is ignored)
@@ -2004,6 +2011,11 @@ package:
20042011 ],
20052012 ]);
20062013
2014+ .. versionadded :: 5.1
2015+
2016+ The option to use an absolute URL in ``json_manifest_path `` was introduced
2017+ in Symfony 5.1.
2018+
20072019.. note ::
20082020
20092021 This parameter cannot be set at the same time as ``version `` or ``version_strategy ``.
0 commit comments