Skip to content

feat(cloudflare): Add wranglerConfigPath to Vite options - #22800

Merged
JPeer264 merged 2 commits into
developfrom
jp/cloudflare-vite-wrangler-config-path
Jul 29, 2026
Merged

feat(cloudflare): Add wranglerConfigPath to Vite options#22800
JPeer264 merged 2 commits into
developfrom
jp/cloudflare-vite-wrangler-config-path

Conversation

@JPeer264

Copy link
Copy Markdown
Member

In the Cloudflare Vite plugin there is the configPath option that lets you define the wrangler config path. When this is set we can't find the wrangler config, as it is set somewhere else.

Unfortunately we can't retrieve the options directly from their plugin, so it has to be set in our plugin too in order to get the correct wrangler config.

This adds the option wranglerConfigPath and would be used as the following:

export default defineConfig({
  plugins: [
    cloudflare({ configPath: "./wrangler.agent.jsonc" }),
    sentryCloudflareVitePlugin({
      wranglerConfigPath: "./wrangler.agent.jsonc",
      _experimental: {
        autoInstrumentation: true,
      },
    }),
  ],
});

@JPeer264 JPeer264 self-assigned this Jul 29, 2026
@JPeer264
JPeer264 requested a review from a team as a code owner July 29, 2026 07:35
@JPeer264
JPeer264 requested review from andreiborza, isaacs and mydea and removed request for a team July 29, 2026 07:35
Comment thread packages/cloudflare/src/vite/autoInstrument.ts Outdated
@JPeer264
JPeer264 requested a review from andreiborza July 29, 2026 08:25
@JPeer264
JPeer264 enabled auto-merge (squash) July 29, 2026 08:30
@JPeer264
JPeer264 merged commit ac9c49d into develop Jul 29, 2026
81 checks passed
@JPeer264
JPeer264 deleted the jp/cloudflare-vite-wrangler-config-path branch July 29, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants