diff --git a/.changeset/tender-cameras-care.md b/.changeset/tender-cameras-care.md new file mode 100644 index 0000000..2ff758d --- /dev/null +++ b/.changeset/tender-cameras-care.md @@ -0,0 +1,5 @@ +--- +'@inkathon/frontend': patch +--- + +Fix `@polkadot/*` package warnings about cjs/esm duplications. diff --git a/frontend/next.config.js b/frontend/next.config.js index 21ffcb7..e907127 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -5,7 +5,21 @@ /** * @type {import('next').NextConfig} **/ -let nextConfig = {} +let nextConfig = { + // Fix for warnings about cjs/esm package duplication + // See: https://github.com/polkadot-js/api/issues/5636 + transpilePackages: [ + '@polkadot/api', + '@polkadot/api-contract', + '@polkadot/extension-dapp', + '@polkadot/extension-inject', + '@polkadot/keyring', + '@polkadot/types', + '@polkadot/types-support', + '@polkadot/util', + '@polkadot/util-crypto', + ], +} const withTwin = require('./withTwin.js') nextConfig = withTwin(nextConfig)