@@ -60,6 +60,9 @@ def get_as_tags(bundle_name, extension=None, config='DEFAULT', suffix='', attrs=
6060
6161 bundle = _get_bundle (bundle_name , extension , config )
6262 tags = []
63+
64+ loader = get_loader (config )
65+
6366 for chunk in bundle :
6467 if chunk ['name' ].endswith (('.js' , '.js.gz' )):
6568 if is_preload :
@@ -68,12 +71,21 @@ def get_as_tags(bundle_name, extension=None, config='DEFAULT', suffix='', attrs=
6871 ).format ('' .join ([chunk ['url' ], suffix ]), attrs ))
6972 else :
7073 tags .append ((
71- '<script src="{0}" {1}></script>'
72- ).format ('' .join ([chunk ['url' ], suffix ]), attrs ))
74+ '<script src="{0}" {1}{2}></script>'
75+ ).format (
76+ '' .join ([chunk ['url' ], suffix ]),
77+ attrs ,
78+ loader .get_integrity_attr (chunk ),
79+ ))
7380 elif chunk ['name' ].endswith (('.css' , '.css.gz' )):
7481 tags .append ((
75- '<link href="{0}" rel={2} {1}/>'
76- ).format ('' .join ([chunk ['url' ], suffix ]), attrs , '"stylesheet"' if not is_preload else '"preload" as="style"' ))
82+ '<link href="{0}" rel={2} {1}{3}/>'
83+ ).format (
84+ '' .join ([chunk ['url' ], suffix ]),
85+ attrs ,
86+ '"stylesheet"' if not is_preload else '"preload" as="style"' ,
87+ loader .get_integrity_attr (chunk ),
88+ ))
7789 return tags
7890
7991
0 commit comments