[flutter_tools] dont include material shaders in web builds (#116538)

* [flutter_tools] dont include material shaders in web builds

* add test
This commit is contained in:
Jonah Williams
2022-12-05 12:42:15 -08:00
committed by GitHub
parent 06e7c7a618
commit 27281dab81
2 changed files with 62 additions and 1 deletions

View File

@@ -424,7 +424,8 @@ class ManifestAssetBundle implements AssetBundle {
// For all platforms, include the shaders unconditionally. They are
// small, and whether they're used is determined only by the app source
// code and not by the Flutter manifest.
..._getMaterialShaders(),
if (targetPlatform != TargetPlatform.web_javascript)
..._getMaterialShaders(),
];
for (final _Asset asset in materialAssets) {
final File assetFile = asset.lookupAssetFile(_fileSystem);