Skip to content

Update dependency @vitejs/plugin-react to v4.7.0#122

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/vitejs-plugin-react-4.x
Open

Update dependency @vitejs/plugin-react to v4.7.0#122
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/vitejs-plugin-react-4.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 22, 2024

This PR contains the following updates:

Package Change Age Confidence
@vitejs/plugin-react (source) 4.2.14.7.0 age confidence

Release Notes

vitejs/vite-plugin-react (@​vitejs/plugin-react)

v4.7.0

Compare Source

Add HMR support for compound components (#​518)

HMR now works for compound components like this:

const Root = () => <div>Accordion Root</div>
const Item = () => <div>Accordion Item</div>

export const Accordion = { Root, Item }
Return Plugin[] instead of PluginOption[] (#​537)

The return type has changed from react(): PluginOption[] to more specialized type react(): Plugin[]. This allows for type-safe manipulation of plugins, for example:

// previously this causes type errors
react({ babel: { plugins: ['babel-plugin-react-compiler'] } })
  .map(p => ({ ...p, applyToEnvironment: e => e.name === 'client' }))

v4.6.0

Compare Source

Add raw Rolldown support

This plugin only worked with Vite. But now it can also be used with raw Rolldown. The main purpose for using this plugin with Rolldown is to use react compiler.

v4.5.2

Compare Source

Suggest @vitejs/plugin-react-oxc if rolldown-vite is detected #​491

Emit a log which recommends @vitejs/plugin-react-oxc when rolldown-vite is detected to improve performance and use Oxc under the hood. The warning can be disabled by setting disableOxcRecommendation: true in the plugin options.

Use optimizeDeps.rollupOptions instead of optimizeDeps.esbuildOptions for rolldown-vite #​489

This suppresses the warning about optimizeDeps.esbuildOptions being deprecated in rolldown-vite.

Add Vite 7-beta to peerDependencies range #​497

React plugins are compatible with Vite 7, this removes the warning when testing the beta.

v4.5.1

Compare Source

Add explicit semicolon in preambleCode #​485

This fixes an edge case when using HTML minifiers that strips line breaks aggressively.

v4.5.0

Compare Source

Add filter for rolldown-vite #​470

Added filter so that it is more performant when running this plugin with rolldown-powered version of Vite.

Skip HMR for JSX files with hooks #​480

This removes the HMR warning for hooks with JSX.

v4.4.1

Compare Source

Fix type issue when using moduleResolution: "node" in tsconfig #​462

v4.4.0

Compare Source

Make compatible with rolldown-vite

This plugin is now compatible with rolldown-powered version of Vite.
Note that currently the __source property value position might be incorrect. This will be fixed in the near future.

v4.3.4

Compare Source

Add Vite 6 to peerDependencies range

Vite 6 is highly backward compatible, not much to add!

Force Babel to output spec compliant import attributes #​386

The default was an old spec (with type: "json"). We now enforce spec compliant (with { type: "json" })

v4.3.3

Compare Source

React Compiler runtimeModule option removed

React Compiler was updated to accept a target option and runtimeModule was removed. vite-plugin-react will still detect runtimeModule for backwards compatibility.

When using a custom runtimeModule or target !== '19', the plugin will not try to pre-optimize react/compiler-runtime dependency.

The react-compiler-runtime is now available on npm can be used instead of the local shim for people using the compiler with React < 19.

Here is the configuration to use the compiler with React 18 and correct source maps in development:

npm install babel-plugin-react-compiler react-compiler-runtime @&#8203;babel/plugin-transform-react-jsx-development
export default defineConfig(({ command }) => {
  const babelPlugins = [['babel-plugin-react-compiler', { target: '18' }]]
  if (command === 'serve') {
    babelPlugins.push(['@&#8203;babel/plugin-transform-react-jsx-development', {}])
  }

  return {
    plugins: [react({ babel: { plugins: babelPlugins } })],
  }
})

v4.3.2

Compare Source

Ignore directive sourcemap error #​369

v4.3.1

Compare Source

Fix support for React Compiler with React 18

The previous version made this assumption that the compiler was only usable with React 19, but it's possible to use it with React 18 and a custom runtimeModule: https://gist.github.com/poteto/37c076bf112a07ba39d0e5f0645fec43

When using a custom runtimeModule, the plugin will not try to pre-optimize react/compiler-runtime dependency.

Reminder: Vite expect code outside of node_modules to be ESM, so you will need to update the gist with import React from 'react'.

v4.3.0

Compare Source

Fix support for React compiler

Don't set retainLines: true when the React compiler is used. This creates whitespace issues and the compiler is modifying the JSX too much to get correct line numbers after that. If you want to use the React compiler and get back correct line numbers for tools like vite-plugin-react-click-to-component to work, you should update your config to something like:

export default defineConfig(({ command }) => {
  const babelPlugins = [['babel-plugin-react-compiler', {}]]
  if (command === 'serve') {
    babelPlugins.push(['@&#8203;babel/plugin-transform-react-jsx-development', {}])
  }

  return {
    plugins: [react({ babel: { plugins: babelPlugins } })],
  }
})
Support HMR for class components

This is a long overdue and should fix some issues people had with HMR when migrating from CRA.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2024

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
standup-timer Ready Ready Preview, Comment Jun 1, 2026 7:56pm

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 22, 2024

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​vitejs/​plugin-react@​4.2.1 ⏵ 4.7.09910010092100

View full report

@renovate renovate Bot changed the title Update dependency @vitejs/plugin-react to v4.3.0 Update dependency @vitejs/plugin-react to v4.3.1 Jun 10, 2024
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 57397ed to b37ec92 Compare June 10, 2024 01:19
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from b37ec92 to 081c481 Compare September 30, 2024 01:21
@renovate renovate Bot changed the title Update dependency @vitejs/plugin-react to v4.3.1 Update dependency @vitejs/plugin-react to v4.3.2 Sep 30, 2024
@renovate renovate Bot changed the title Update dependency @vitejs/plugin-react to v4.3.2 Update dependency @vitejs/plugin-react to v4.3.3 Oct 19, 2024
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 081c481 to 84e84e1 Compare October 19, 2024 16:58
@renovate renovate Bot changed the title Update dependency @vitejs/plugin-react to v4.3.3 Update dependency @vitejs/plugin-react to v4.3.4 Nov 26, 2024
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 84e84e1 to 26e751f Compare November 26, 2024 11:32
@renovate renovate Bot changed the title Update dependency @vitejs/plugin-react to v4.3.4 Update dependency @vitejs/plugin-react to v4.3.4 - autoclosed Dec 8, 2024
@renovate renovate Bot closed this Dec 8, 2024
@renovate renovate Bot deleted the renovate/vitejs-plugin-react-4.x branch December 8, 2024 18:36
@renovate renovate Bot changed the title Update dependency @vitejs/plugin-react to v4.3.4 - autoclosed Update dependency @vitejs/plugin-react to v4.3.4 Dec 9, 2024
@renovate renovate Bot reopened this Dec 9, 2024
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from cb7459e to 26e751f Compare December 9, 2024 03:30
@renovate renovate Bot changed the title Update dependency @vitejs/plugin-react to v4.3.4 Update dependency @vitejs/plugin-react to v4.4.0 Apr 15, 2025
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 26e751f to 5bcdfad Compare April 15, 2025 10:34
@renovate renovate Bot changed the title Update dependency @vitejs/plugin-react to v4.4.0 Update dependency @vitejs/plugin-react to v4.4.1 Apr 19, 2025
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 5bcdfad to 73aa83c Compare April 19, 2025 13:35
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 73aa83c to f255a0a Compare May 23, 2025 06:56
@renovate renovate Bot changed the title Update dependency @vitejs/plugin-react to v4.4.1 Update dependency @vitejs/plugin-react to v4.5.0 May 23, 2025
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from a321991 to 8997d37 Compare August 13, 2025 13:59
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 8997d37 to 2c33f74 Compare August 19, 2025 15:50
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 2c33f74 to 5424301 Compare August 31, 2025 13:10
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 5424301 to 9493bd6 Compare September 25, 2025 21:28
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 9493bd6 to 887ed72 Compare October 21, 2025 17:42
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 887ed72 to 077252a Compare November 10, 2025 19:35
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 077252a to abea639 Compare November 18, 2025 23:04
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from abea639 to 920c6f4 Compare December 3, 2025 17:08
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 920c6f4 to 06904e7 Compare December 31, 2025 14:47
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 06904e7 to cb2b22c Compare January 8, 2026 20:32
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from cb2b22c to c757be1 Compare January 19, 2026 16:38
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from c757be1 to ae02981 Compare January 23, 2026 17:35
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from ae02981 to 7b589d7 Compare February 2, 2026 20:33
@renovate renovate Bot force-pushed the renovate/vitejs-plugin-react-4.x branch from 7b589d7 to 7fec23c Compare February 12, 2026 16:13
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.

0 participants