Skip to content

v2.2.0

Choose a tag to compare

@oscartbeaumont oscartbeaumont released this 21 Oct 08:00
· 9 commits to main since this release

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 artifactDirectory passed 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 new minimumReleaseAge gate disabled for reproducible installs.

Dependency updates

  • Build tooling: @babel/core 8, vite 8.3.5, tsup 9, eslint 10 (flat config), husky 9, prettier 3.9, @typescript-eslint 8.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/checkout 7.0.1, actions/setup-node 7, pnpm/action-setup 6.1.0.

Full changelog: 2.1.0...2.2.0