chore: snap build tooling cleanup (babel config, preinstalled builds, manifest locales) - #264
chore: snap build tooling cleanup (babel config, preinstalled builds, manifest locales)#264ulissesferreira wants to merge 4 commits into
Conversation
ec61ea5 to
af89a2d
Compare
af89a2d to
7fb5a3b
Compare
| "locales/tr.json", | ||
| "locales/vi.json", | ||
| "locales/zh_CN.json" | ||
| ] |
There was a problem hiding this comment.
This does not do whatever you think it does 😅. It's only used to localize some Snap manifest fields like name and description, which are never seen by our users because the Snap is preinstalled. If you are wondering about the localization text in json's that will be bundled automatically without a problem (doesn't have to be referenced here, it's just code).
| "registry": "https://registry.npmjs.org/" | ||
| } | ||
| }, | ||
| "locales": ["locales/en.json"] |
There was a problem hiding this comment.
This does not do whatever you think it does 😅. It's only used to localize some Snap manifest fields like name and description, which are never seen by our users because the Snap is preinstalled. If you are wondering about the localization text in json's that will be bundled automatically without a problem (doesn't have to be referenced here, it's just code).
| "registry": "https://registry.npmjs.org/" | ||
| } | ||
| }, | ||
| "locales": ["locales/en.json"] |
There was a problem hiding this comment.
This does not do whatever you think it does 😅. It's only used to localize some Snap manifest fields like name and description, which are never seen by our users because the Snap is preinstalled. If you are wondering about the localization text in json's that will be bundled automatically without a problem (doesn't have to be referenced here, it's just code).
| "registry": "https://registry.npmjs.org/" | ||
| } | ||
| }, | ||
| "locales": ["locales/en.json"] |
There was a problem hiding this comment.
This does not do whatever you think it does 😅. It's only used to localize some Snap manifest fields like name and description, which are never seen by our users because the Snap is preinstalled. If you are wondering about the localization text in json's that will be bundled automatically without a problem (doesn't have to be referenced here, it's just code).
| experimental: { wasm: true }, | ||
| preinstalled: { | ||
| removable: false, | ||
| hideSnapBranding: true, |
There was a problem hiding this comment.
| hideSnapBranding: true, | |
| hideSnapBranding: true, | |
| hidden: true, |
In the CLI this has to be explicit
7fb5a3b to
f430b2b
Compare
Explanation
This PR is a round of Snap build/tooling cleanup identified during a quick audit from the Snaps team:
babel.config.jsfrom thebitcoin-wallet-snap,stellar-wallet-snap, andtron-wallet-snappackages. These per-package Babel configs are no longer needed, and the corresponding documentation reference was removed fromAGENTS.md.build-preinstalled-snap.jsscripts in all four wallet Snaps (bitcoin,solana,stellar,tron) with the built-inmm-snap build --preinstalledflag. The preinstalled snap options (removable: false,hideSnapBranding: true) now live in each package'ssnap.config.ts, and the build scripts inpackage.jsonwere simplified accordingly (locale generation now runs aftermm-snap build). The now-unused script entries were also removed fromeslint-suppressions.json.localesfromsnap.manifest.jsonfor all four wallet Snaps.polyfills: truein everysnap.config.ts(including thecreate-packagesnap template, previouslypolyfills: false). Explicit per-snap polyfill allowlists were evaluated and discarded: Webpack only bundles polyfills that are actually imported after minification, so explicit sets produce byte-identical bundles topolyfills: true— bundle sizes were compared againstmainand are unchanged for all four Snaps. The remainingfs/modulefallback warnings fortron-wallet-snapare pre-existing and come from node-only code paths that are unreachable in-browser.There are no runtime behavior changes to the Snaps themselves; this only affects how the preinstalled snap artifacts are generated at build time.
References
Checklist