Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack: implement overrides for icons and manifests fields for non-main builds #26260

Open
davidmurdoch opened this issue Jul 31, 2024 · 2 comments
Labels
Sev2-normal Normal severity; minor loss of service or inconvenience. team-extension-platform type-bug webpack

Comments

@davidmurdoch
Copy link
Contributor

davidmurdoch commented Jul 31, 2024

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 our build.yml's features.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 use build.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 overrides

Since webpack attempts to find all assets automatically (almost always, some assets are copied the CopyPlugin
: _locales and images), I'd like to make our ManifestPlugin learn to parse the fields in the manifest.json file, find all fields that represent assets that need to be copied, and then emitAsset (webpack plugin lingo) those assets so they can be tracked by webpack internals, and mapped to a final manifest.json file. Icon files like images/icon-512.png would end up being something like assets/icon-512.d55afc3b49c5ff325cc1.png and the manifest.json would be altered to reference it ("512": "assets/icon-512.d55afc3b49c5ff325cc1.png").

@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Jul 31, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Jul 31, 2024
@metamaskbot metamaskbot added the INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. label Jul 31, 2024
@desi desi added team-extension-platform Sev2-normal Normal severity; minor loss of service or inconvenience. and removed INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. labels Aug 12, 2024
@metamaskbot metamaskbot added the INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. label Aug 13, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Nov 11, 2024
@hjetpoluru hjetpoluru removed the INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. label Dec 3, 2024
@github-actions github-actions bot removed the stale issues and PRs marked as stale label Dec 4, 2024
@hjetpoluru
Copy link
Contributor

Issue still exists and removing the stale label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sev2-normal Normal severity; minor loss of service or inconvenience. team-extension-platform type-bug webpack
Projects
Status: To be fixed
Status: To be fixed
Development

No branches or pull requests

4 participants