diff --git a/.gitignore b/.gitignore index 450ea387c0..4e1636b837 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ coverage *.log /tsconfig.tsbuildinfo /tsconfig.dev.tsbuildinfo +/bundle/ diff --git a/.size-limit.cjs b/.size-limit.cjs index d7cef565b2..3c5d0d8261 100644 --- a/.size-limit.cjs +++ b/.size-limit.cjs @@ -1,37 +1,40 @@ module.exports = [ { name: "Waku core", - path: "dist/bundle.min.js", + path: "bundle/index.js", import: "{ Waku }", }, { name: "Waku default setup", - path: "dist/bundle.min.js", - import: "{ createWaku, waitForRemotePeer }", + path: ["bundle/index.js", "bundle/lib/create_waku.js"], + import: { + "./bundle/lib/create_waku.js": "{ createWaku }", + "./bundle/index.js": "{ waitForRemotePeer }", + }, }, { name: "Asymmetric, symmetric encryption and signature", - path: "dist/bundle.min.js", - import: "{ waku_message }", + path: "bundle/index.js", + import: "{ WakuMessage }", }, { name: "DNS discovery", - path: "dist/bundle.min.js", - import: "{ discovery }", + path: "bundle/lib/peer_discovery_dns.js", + import: "{ PeerDiscoveryDns }", }, { name: "Privacy preserving protocols", - path: "dist/bundle.min.js", + path: "bundle/index.js", import: "{ WakuRelay }", }, { name: "Light protocols", - path: "dist/bundle.min.js", + path: "bundle/index.js", import: "{ WakuLightPush, WakuFilter }", }, { name: "History retrieval protocols", - path: "dist/bundle.min.js", + path: "bundle/index.js", import: "{ WakuStore }", }, ]; diff --git a/CHANGELOG.md b/CHANGELOG.md index cd9014f8fa..41ad7da1a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,12 +20,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Examples: Updated store-js and relay-js to demonstrate usage of ESM bundle in `