@@ -1927,10 +1927,11 @@ json_manifest_path
1927
1927
1928
1928
**type **: ``string `` **default **: ``null ``
1929
1929
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.
1934
1935
1935
1936
.. tip ::
1936
1937
@@ -1951,6 +1952,8 @@ package:
1951
1952
assets :
1952
1953
# this manifest is applied to every asset (including packages)
1953
1954
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'
1954
1957
packages :
1955
1958
foo_package :
1956
1959
# this package uses its own manifest (the default file is ignored)
@@ -1972,6 +1975,8 @@ package:
1972
1975
<framework : config >
1973
1976
<!-- this manifest is applied to every asset (including packages) -->
1974
1977
<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"> -->
1975
1980
<!-- this package uses its own manifest (the default file is ignored) -->
1976
1981
<framework : package
1977
1982
name =" foo_package"
@@ -1991,6 +1996,8 @@ package:
1991
1996
'assets' => [
1992
1997
// this manifest is applied to every asset (including packages)
1993
1998
'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',
1994
2001
'packages' => [
1995
2002
'foo_package' => [
1996
2003
// this package uses its own manifest (the default file is ignored)
@@ -2004,6 +2011,11 @@ package:
2004
2011
],
2005
2012
]);
2006
2013
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
+
2007
2019
.. note ::
2008
2020
2009
2021
This parameter cannot be set at the same time as ``version `` or ``version_strategy ``.
0 commit comments