croct
Learn how to configure the Croct Vite plugin.
This plugin reads the public Croct 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 needs no manual configuration.
Add it to your Vite config after the Hydrogen and router plugins (reactRouter() for React Router 7, or remix() for Remix).
Signature
This function has the following signature:
function croct(): Plugin;Example
Add the plugin to your Vite config:
vite.config.ts
import {croct} from '@croct/plug-hydrogen/vite';
export default defineConfig({ plugins: [hydrogen(), oxygen(), reactRouter(), croct()],});Parameters
This function does not take any arguments.