File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -302,6 +302,24 @@ export default defineConfig({
302302
303303オブジェクト形式の ` output.manualChunks ` オプションはサポートされなくなりました。関数形式の ` output.manualChunks ` は非推奨です。Rolldown にはより柔軟な [ ` codeSplitting ` ] ( https://rolldown.rs/reference/OutputOptions.codeSplitting ) オプションがあります。` codeSplitting ` の詳細については、Rolldown のドキュメントを参照してください: [ Manual Code Splitting - Rolldown] ( https://rolldown.rs/in-depth/manual-code-splitting ) 。
304304
305+ ### ` build() ` が ` BundleError ` をスロー
306+
307+ _ この変更は JS API ユーザーにのみ影響します。_
308+
309+ ` build() ` は、プラグインでスローされた生のエラーの代わりに [ ` BundleError ` ] ( https://rolldown.rs/reference/TypeAlias.BundleError ) をスローするようになりました。` BundleError ` は ` Error & { errors?: RolldownError[] } ` として型付けされており、個々のエラーを ` errors ` 配列にラップします。個々のエラーが必要な場合は、` .errors ` にアクセスする必要があります:
310+
311+ ``` js
312+ try {
313+ await build ()
314+ } catch (e) {
315+ if (e .errors ) {
316+ for (const error of e .errors ) {
317+ console .log (error .code ) // エラーコード
318+ }
319+ }
320+ }
321+ ```
322+
305323### モジュールタイプのサポートと自動検出
306324
307325_ この変更はプラグイン作成者にのみ影響します。_
You can’t perform that action at this time.
0 commit comments