TypeScript React プロジェクトでこれをインポートする際に問題が発生しています。
import { SwapWidget } from '@uniswap/widgets';
コンパイル時にこのエラーが発生しますyarn build:
Can't import the named export 'SwapWidget' (imported as 'SwapWidget') from default-exporting module (only default export is available)
これは、@uniswap\widgetsライブラリ内の宣言です。
declare type SwapWidgetProps = SwapProps & WidgetProps;
declare function SwapWidget(props: SwapWidgetProps): JSX.Element;
export { SUPPORTED_LOCALES, SwapWidget };
ts-config.js:
{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx"
  },
  "include": [
    "src"
  ]
}