@clientshell/vite
v0.1.0
Published
Vite plugin for clientshell — automatic manifest output and dev stub
Downloads
104
Readme
@clientshell/vite
Vite plugin for clientshell — automatic manifest output and dev stub.
Install
pnpm add -D @clientshell/viteUsage
// vite.config.ts
import { defineConfig } from "vite";
import { clientshellPlugin } from "@clientshell/vite";
import { clientEnvSchema } from "./src/env.schema";
export default defineConfig({
plugins: [
clientshellPlugin({
schema: clientEnvSchema,
prefix: "CLIENT_",
devValues: {
API_URL: "http://localhost:3000",
},
}),
],
});What it does
- Dev server: Serves
/env-config.jswith stub values so local dev uses the samewindow.__CLIENT_CONFIG__contract. - Build: Writes
clientshell.manifest.jsoninto the build output for the Go injector.
