ionic-team / ionic-team/rollup-plugin-node-polyfills
homeDir not exported by "os"
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 142
- フォーク
- 65
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hello,
Thanks for your work on this excellent and critical piece of OSS.
I am experiencing an issue trying to polyfill the node os module in a Vite build that bundles some pieces of the AWS javascript SDK v3 with my application. Specifically, AWS is trying to import homeDir from "os", which is a part of the node module here, but is not exported by rollup-plugin-node-polyfills/polyfills/os.js
Error: 'homedir' is not exported by node_modules/rollup-plugin-node-polyfills/polyfills/os.js, imported by node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/shared-ini-file-loader/dist-es/getHomeDir.js
As far as I can tell, it makes no sense to want a "homeDir" in the browser, so this may be an issue that should be raised with the AWS team. However, since it is an export on the node module, I think that some form of support, such as defaulting to the project root, or a configurable option to set the dist or public folder may be in order.
What do you think?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
polyfills/os.js と @aws-sdk/shared-ini-file-loader/dist-es/getHomeDir.js からの失敗している import から始めます。issue では複数の可能な動作が提案されていますが、どれを選ぶかは決められていないため、ブラウザビルドで polyfill が Node の os.homedir export をどのように扱うべきか確認してください。合意した動作がサポートされ、報告された Vite/Rollup の import エラーが発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- build-system, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100