Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/src/pages/en/(pages)/features/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ Clear screen on server start. Default is `false`. If you want to start with a cl

Disable color output. Default is `false`. This is useful for CI/CD environments.

<Link name="dev-no-validation">
### --no-validation
</Link>

Skip configuration validation. Default is `false`.

When set, the development server will not validate your `react-server.config.*` file on startup. This is useful as an escape hatch if validation incorrectly rejects a valid configuration, or when you intentionally need to use an option that is normally forbidden.

<Link name="dev-eval">
### --eval
</Link>
Expand Down Expand Up @@ -179,6 +187,14 @@ See more details in the Vite documentation at [build.sourcemap](https://vitejs.d

Disable color output. Default is `false`. This is useful for CI/CD environments.

<Link name="build-no-validation">
### --no-validation
</Link>

Skip configuration validation. Default is `false`.

When set, the build process will not validate your `react-server.config.*` file before building. This is useful as an escape hatch if validation incorrectly rejects a valid configuration, or when you intentionally need to use an option that is normally forbidden.

<Link name="build-export">
### --export
</Link>
Expand Down
15 changes: 15 additions & 0 deletions docs/src/pages/en/(pages)/features/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,18 @@ Console forwarding is enabled by default in your application. To disable console
"console": false
}
```

<Link name="config-validation">
#### Config validation
</Link>

By default, `@lazarv/react-server` validates your configuration file on startup (development) and before building (production). If the configuration contains invalid or forbidden options, you will see a clear error message.

To disable config validation, use the `--no-validation` CLI flag:

```sh
pnpm react-server ./App.jsx --no-validation
pnpm react-server build --no-validation
```

This is useful as an escape hatch if validation incorrectly rejects a valid configuration, or when you intentionally need to bypass a forbidden option.
16 changes: 16 additions & 0 deletions docs/src/pages/ja/(pages)/features/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ CORSを有効にします。デフォルトは`false`です。

カラー出力を無効化するか。デフォルトは`false`です。CI/CD環境では便利なオプションです。

<Link name="dev-no-validation">
### --no-validation
</Link>

設定ファイルのバリデーションをスキップします。デフォルトは`false`です。

このオプションを指定すると、開発サーバーの起動時に`react-server.config.*`ファイルのバリデーションを行いません。バリデーションが正しい設定を誤って拒否する場合や、通常は禁止されているオプションを意図的に使用する必要がある場合のエスケープハッチとして便利です。

<Link name="dev-eval">
### --eval
</Link>
Expand Down Expand Up @@ -179,6 +187,14 @@ export default {

コンソールでのカラー出力するか指定します。デフォルトは`false`です。CI/CD環境では便利なオプションです。

<Link name="build-no-validation">
### --no-validation
</Link>

設定ファイルのバリデーションをスキップします。デフォルトは`false`です。

このオプションを指定すると、ビルドプロセスの前に`react-server.config.*`ファイルのバリデーションを行いません。バリデーションが正しい設定を誤って拒否する場合や、通常は禁止されているオプションを意図的に使用する必要がある場合のエスケープハッチとして便利です。

<Link name="build-export">
### --export
</Link>
Expand Down
17 changes: 16 additions & 1 deletion docs/src/pages/ja/(pages)/features/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,19 @@ export default {
return pathname !== "/";
},
};
```
```

<Link name="config-validation">
#### 設定のバリデーション
</Link>

デフォルトでは、`@lazarv/react-server`は起動時(開発)およびビルド前(プロダクション)に設定ファイルをバリデーションします。設定に無効なオプションや禁止されたオプションが含まれている場合、明確なエラーメッセージが表示されます。

設定のバリデーションを無効にするには、`--no-validation` CLIフラグを使用します:

```sh
pnpm react-server ./App.jsx --no-validation
pnpm react-server build --no-validation
```

バリデーションが正しい設定を誤って拒否する場合や、禁止されたオプションを意図的にバイパスする必要がある場合のエスケープハッチとして便利です。
1 change: 1 addition & 0 deletions packages/react-server/bin/commands/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default (cli) =>
)
.option("--no-color", "disable color output", { default: false })
.option("--no-check", "skip dependency checks", { default: false })
.option("--no-validation", "skip config validation", { default: false })
.option("--export", "[boolean] static export")
.option("--compression", "[boolean] enable compression", { default: false })
.option("--adapter <adapter>", "[boolean|string] adapter", {
Expand Down
1 change: 1 addition & 0 deletions packages/react-server/bin/commands/dev.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default (cli) =>
})
.option("--no-color", "disable color output", { default: false })
.option("--no-check", "skip dependency checks", { default: false })
.option("--no-validation", "skip config validation", { default: false })
.option("-e, --eval <code>", "evaluate code", { type: "string" })
.option("-o, --outDir <dir>", "[string] output directory", {
default: ".react-server",
Expand Down
Loading