Skip to content

Conversation

@hirokisakabe
Copy link
Owner

Summary

  • ESM 環境で @hirokisakabe/pom/schema をインポートした際に発生していた ERR_MODULE_NOT_FOUND エラーを修正
  • TypeScript の moduleResolution: NodeNextrewriteRelativeImportExtensions オプションを使用して、ビルド時に相対 import に .js 拡張子を自動追加

変更内容

  • tsconfig.json: modulemoduleResolutionNodeNext に変更、rewriteRelativeImportExtensions: true を追加
  • すべての相対 import に .ts 拡張子を追加(ビルド時に .js に変換される)
  • pptxgenjsimage-size のインポート方法を NodeNext 互換に修正

Test plan

  • npm run build が成功すること
  • npm run test:run が成功すること
  • npm run lint が成功すること
  • npm run fmt:check が成功すること
  • 生成された dist/schema.js で拡張子が .js になっていること

🤖 Generated with Claude Code

hirokisakabe and others added 2 commits January 24, 2026 20:06
- tsconfig.json を moduleResolution: NodeNext に変更
- rewriteRelativeImportExtensions: true を有効化
- すべての相対 import に .ts 拡張子を追加
- pptxgenjs と image-size の NodeNext 互換インポート

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- pptxgenjs と image-size の .default フォールバック処理を追加
- tsx と NodeNext 環境の両方で動作するよう修正

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@hirokisakabe hirokisakabe merged commit 7475340 into main Jan 24, 2026
2 checks passed
@hirokisakabe hirokisakabe deleted the fix/esm-import-extensions branch January 24, 2026 11:12
@github-actions github-actions bot mentioned this pull request Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant