webpack: implement overrides for icons and manifests fields for non-main builds #26260
Labels
Sev2-normal
Normal severity; minor loss of service or inconvenience.
team-extension-platform
type-bug
webpack
The webpack build system doesn't support loading in
manifest.json
overrides from specific build types (mmi, flask, etc). It also doesn't support copying files using the fields in ourbuild.yml
'sfeatures.assets
section.Notes on
build.yml
features.assets
section:The reason this hasn't been done yet is because I think we should go about it differently. It seems that we sometimes use
manifest.json
overrides files for customizing fields, sometimes we usebuild.yml
fields, and sometimes we use environment variables. Each way of customization doesn't always overlap with the other ways, but sometimes it does, I think? It's very confusing.I'd like to eliminate one of these ways of customization in the primary build system, with the webpack build in mind, and then implement it in webpack.
Notes on build-type
manifest.json
overridesSince webpack attempts to find all assets automatically (almost always, some assets are copied the
CopyPlugin
:
_locales
andimages
), I'd like to make ourManifestPlugin
learn to parse the fields in themanifest.json
file, find all fields that represent assets that need to be copied, and thenemitAsset
(webpack plugin lingo) those assets so they can be tracked by webpack internals, and mapped to a finalmanifest.json
file. Icon files likeimages/icon-512.png
would end up being something likeassets/icon-512.d55afc3b49c5ff325cc1.png
and themanifest.json
would be altered to reference it ("512": "assets/icon-512.d55afc3b49c5ff325cc1.png"
).The text was updated successfully, but these errors were encountered: