i18n(ja): update guides/imports.mdx#12449
Conversation
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
jp-knj
left a comment
There was a problem hiding this comment.
Thanks so much for the PR and for keeping the ja docs up to date.
this is a great improvement overall 👍🏿
I left a few small suggestions. If you can address these, I’m happy to approve.
|
|
||
| Viteの[`import.meta.glob()`](https://vite.dev/guide/features.html#glob-import)は、globパターンで多数のファイルを一度にインポートする方法です。 | ||
|
|
||
| `import.meta.glob()`は、インポートしたいローカルファイルを示す相対的な[globパターン](#globパターン)を引数として受け取ります。戻り値はマッチしたファイルのエクスポートの配列です。モジュールを同期的に読み込むには、第2引数に`{ eager: true }`を渡します。 |
There was a problem hiding this comment.
感想です。
日本語のドキュメントしか、確認できてないんですが
import.meta.glob() の戻り値は配列ではなくオブジェクト(連想配列)なのかなと考えていました。配列で扱いたいなら Object.values() を使ってから処理することになりそうです。
There was a problem hiding this comment.
おっしゃる通りでした!ありがとうございます!
i18n(ja): adjust the wordings Co-authored-by: knj <kenji.tomita1996@gmail.com>
Description (required)
This PR adds japanese translations about
import.meta.glob.Related issues & labels (optional)
For Astro version:
6.0. See astro PR #14421.