Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docusaurus を更新(v2.3.1) #150

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

su8ru
Copy link
Contributor

@su8ru su8ru commented Feb 21, 2023

Docusaurus を 2.3.1 に更新します
changelog を読む限り、大きな変更は無いはずです

ついでに package.json の範囲で他パッケージも更新します

また、これにより #147 が閉じるはずです

@su8ru su8ru added the dependencies Pull requests that update a dependency file label Feb 21, 2023
@su8ru su8ru requested a review from solufa February 21, 2023 19:36
@su8ru su8ru self-assigned this Feb 21, 2023
@vercel
Copy link

vercel bot commented Feb 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
frourio-com ✅ Ready (Inspect) Visit Preview Feb 21, 2023 at 7:36PM (UTC)

@su8ru
Copy link
Contributor Author

su8ru commented Feb 22, 2023

docusaurus 内部が ESM になった影響でモジュール参照が壊れてる?
"moduleResolution": "node16" で解決できそう
facebook/docusaurus#8226 (comment)


これをすると、react-github-btn を import できなくなる
エラーメッセージは以下の通りだが、言っていることが逆な気がする
Very confusing とまで言われている microsoft/TypeScript#50009

error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("react-github-btn")' call instead.
To convert this file to an ECMAScript module, add the field "type": "module" to 'package.json'.

"type": "module" を指定すると全体がまるごと esm になってしまい、変更コストが大きいため要検討
v2.2.0 のときと違い、今すぐ欲しい機能があるわけでもないので一旦 WIP

@su8ru su8ru marked this pull request as draft February 22, 2023 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant