Repository navigation
v2.2.0
Highlights
New: createRelayPlugin(options) — pass options straight through to babel-plugin-relay (artifactDirectory, eagerEsModules, …). This fixes setups where babel-plugin-relay cannot discover the Relay config on its own: Vitest workspaces, monorepos where the process cwd is a parent directory, and multi-project (projects) Relay configs.
import { createRelayPlugin } from "vite-plugin-relay";
export default defineConfig({
plugins: [
createRelayPlugin({
artifactDirectory: "./src/__generated__",
eagerEsModules: true,
}),
],
});plugins: [relay] is unchanged and keeps relying on automatic config discovery.
Fixes
- A relative
artifactDirectorypassed to the plugin is resolved against the Vite root instead of the process cwd. - CI works on pnpm 12: lockfile upgraded to v9, dependency build scripts approved (
allowBuilds), and the newminimumReleaseAgegate disabled for reproducible installs.
Dependency updates
- Build tooling:
@babel/core8,vite8.3.5,tsup9,eslint10 (flat config),husky9,prettier3.9,@typescript-eslint8.72. - Example: React 19 with matching
react-dom, and the Relay stack on 21 (react-relay,relay-runtime,babel-plugin-relay,relay-compiler). - GitHub Actions:
actions/checkout7.0.1,actions/setup-node7,pnpm/action-setup6.1.0.
Full changelog: 2.1.0...2.2.0