Fixes issue #7, i.e. when using waku-relayer-client in Node.js without any bundler (or with a bundler set up with specific configurations).
Problem
Waku is exported only in ESM, not CommonJS, so this forces waku-relayer-client to be ESM-only too. When that's the case, we are actually using ESM incorrectly, because we have to import { foo } from './foo.js not import { foo } from './foo'.
Solution
This PR adds file extensions to all ESM imports, and tweaks the tsconfig.json accordingly.
Tests
Unit tests pass locally
Used this in a Nest demo like issue #7 showed, and it worked
Context
Fixes issue #7, i.e. when using waku-relayer-client in Node.js without any bundler (or with a bundler set up with specific configurations).
Problem
Waku is exported only in ESM, not CommonJS, so this forces waku-relayer-client to be ESM-only too. When that's the case, we are actually using ESM incorrectly, because we have to
import { foo } from './foo.js
notimport { foo } from './foo'
.Solution
This PR adds file extensions to all ESM imports, and tweaks the tsconfig.json accordingly.
Tests