Skip to content

Commit

Permalink
fix: @polkadot/* package duplication warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wottpal committed Oct 23, 2023
1 parent 7021bd6 commit 1556c0f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tender-cameras-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@inkathon/frontend': patch
---

Fix `@polkadot/*` package warnings about cjs/esm duplications.
16 changes: 15 additions & 1 deletion frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

1 comment on commit 1556c0f

@vercel
Copy link

@vercel vercel bot commented on 1556c0f Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.