# croct

Learn how to configure the Croct Vite plugin.

This plugin reads the public Croct [environment variables](/reference/sdk/hydrogen/api/environment-variables) and bakes the resolved configuration into the browser bundle, exposing it to the SDK through a virtual module. As a result, the [provider component](/reference/sdk/hydrogen/api/components/croct-provider) needs no manual configuration.

Add it to your [Vite](https://vite.dev) config after the Hydrogen and router plugins (`reactRouter()` for [React Router 7](https://reactrouter.com), or `remix()` for [Remix](https://remix.run)).

## Signature

This function has the following signature:

```ts
function croct(): Plugin;
```

## Example

Add the plugin to your Vite config:

**vite.config.ts**

```ts
import {croct} from '@croct/plug-hydrogen/vite';

export default defineConfig({
  plugins: [hydrogen(), oxygen(), reactRouter(), croct()],
});
```

## Parameters

This function does not take any arguments.
