Color mode

Search notes

Filter with tag:, lang:, or path:.

クライアントエントリ(Client Entry)

クライアントエントリは、実行時に本当に必要なブラウザJavaScriptの初期化を宣言します。各エントリはプラグイン名、module specifier、任意のexport名、初期化処理に渡す公開設定を持ちます。

宣言

ts
clientEntries: [
  {
    pluginName: "example",
    moduleSpecifier: "@riebeckite/plugin-example/client",
    exportName: "initExample",
    publicConfig: { selector: ".example" },
  },
]

使う場面

ブラウザでの初期化が必要な場合にだけクライアントエントリを追加してください。SSRやビルド時に完結するプラグインには、クライアント用のJavaScriptを追加しないでください。publicConfigはクライアントの初期化処理に渡され、静的ホスト向けにマニフェストへ記録されます。

関連用語

さらに詳しく

Local Graph

Nearby Notes

Open in Explorer →
クライアントエントリ(Client Entry)プラグイン(Plugin)アイランド(Island)エンドポイント(Endpoint)アセット(Asset)
CurrentOutgoingBacklink