Open SgtPooki opened 3 months ago
╰─ ✔ ❯ npm run build -- -b
> @helia/verified-fetch@1.3.1 build
> aegir build -b
[10:41:55] tsc [started]
[10:41:56] tsc [completed]
[10:41:56] esbuild [started]
[10:41:56] → Use https://esbuild.github.io/analyze/ to load "./dist/stats.json".
[10:41:56] → 124.57KB (▼-7.43KB / 132KB)
[10:41:56] esbuild [completed]
ipfs-unixfs-importer
marked as external
╰─ ✔ ❯ npm run build -- -b
> @helia/verified-fetch@1.3.1 build
> aegir build -b
[10:44:25] tsc [started]
[10:44:26] tsc [completed]
[10:44:26] esbuild [started]
[10:44:27] → Use https://esbuild.github.io/analyze/ to load "./dist/stats.json".
[10:44:27] → 116.04KB (▼-15.96KB / 132KB)
[10:44:27] esbuild [completed]
.aegir.js changes:
diff --git a/packages/verified-fetch/.aegir.js b/packages/verified-fetch/.aegir.js
index 89b5633..cbd9809 100644
--- a/packages/verified-fetch/.aegir.js
+++ b/packages/verified-fetch/.aegir.js
@@ -1,8 +1,13 @@
/** @type {import('aegir').PartialOptions} */
const options = {
build: {
- bundlesizeMax: '132KB'
- }
+ bundlesizeMax: '132KB',
+ config: {
+ external: [
+ 'ipfs-unixfs-importer'
+ ],
+ }
+ },
}
export default options
Note that tests still pass with ipfs-unixfs-importer marked as external
this will be resolved by #32 eventually
since we're not using any importing functionality in verified-fetch, we should make sure our resulting bundle does not include
ipfs-unixfs-importer
(or others.. which can be handled in separate issue)running
npm why ipfs-unixfs-importer
in helia-service-worker-gateway shows the following:Can we explicitly remove ipfs-unixfs-importer during esbuild, or do we need to modify @helia/unixfs to export a "getter only" version?