Skip to content

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

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

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

Conversation

@renovate

@renovaterenovateBot commented Feb 28, 2024

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

PackageChangeAgeConfidence
@vitejs/plugin-react (source)4.0.14.7.0ageconfidence

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:

constRoot=()=><div>Accordion Root</div>constItem=()=><div>Accordion Item</div>exportconstAccordion={ 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 errorsreact({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 @babel/plugin-transform-react-jsx-development
exportdefaultdefineConfig(({ command })=>{constbabelPlugins=[['babel-plugin-react-compiler',{target: '18'}]]if(command==='serve'){babelPlugins.push(['@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:

exportdefaultdefineConfig(({ command })=>{constbabelPlugins=[['babel-plugin-react-compiler',{}]]if(command==='serve'){babelPlugins.push(['@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.

v4.2.1

Compare Source

Remove generic parameter on Plugin to avoid type error with Rollup 4/Vite 5 and skipLibCheck: false.

I expect very few people to currently use this feature, but if you are extending the React plugin via api object, you can get back the typing of the hook by importing ViteReactPluginApi:

importtype{Plugin}from'vite'importtype{ViteReactPluginApi}from'@vitejs/plugin-react'exportconstsomePlugin: Plugin={name: 'some-plugin',api: {reactBabel: (babelConfig)=>{babelConfig.plugins.push('some-babel-plugin')},}satisfiesViteReactPluginApi,}

v4.2.0

Compare Source

Update peer dependency range to target Vite 5

There were no breaking change that impacted this plugin, so any combination of React plugins and Vite core version will work.

Align jsx runtime for optimized dependencies

This will only affect people using internal libraries that contains untranspiled JSX. This change aligns the optimizer with the source code and avoid issues when the published source don't have React in the scope.

Reminder: While being partially supported in Vite, publishing TS & JSX outside of internal libraries is highly discouraged.

v4.1.1

Compare Source

  • Enable retainLines to get correct line numbers for jsxDev (fix #​235)

v4.1.0

Compare Source

  • Add @types/babel__cores to dependencies (fix #​211)
  • Improve build perf when not using Babel plugins by lazy loading @babel/core#​212
  • Better invalidation message when an export is added & fix HMR for export of nullish values #​215
  • Include non-dev jsx runtime in optimizeDeps & support HMR for JS files using the non dev runtime #​224
  • The build output now contains a index.d.cts file so you don't get types errors when setting moduleResolution to node16 or nodenext in your tsconfig (we recommend using bundler which is more close to how Vite works)

v4.0.4

Compare Source

  • Fix #​198: Enable Babel if presets list is not empty

v4.0.3

Compare Source

  • Revert #​108: Remove throw when refresh runtime is loaded twice to enable usage in micro frontend apps. This was added to help fix setup usage, and this is not worth an annoying warning for others or a config parameter.

v4.0.2

Compare Source

  • Fix fast-refresh for files that are transformed into jsx (#​188)

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.

@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.2.1Update dependency @vitejs/plugin-react to v4.3.0May 22, 2024
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.3.0Update dependency @vitejs/plugin-react to v4.3.1Jun 10, 2024
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.3.1Update dependency @vitejs/plugin-react to v4.3.2Sep 30, 2024
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.3.2Update dependency @vitejs/plugin-react to v4.3.3Oct 20, 2024
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.3.3Update dependency @vitejs/plugin-react to v4.3.4Nov 26, 2024
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 2264803 to 8b06075CompareJanuary 24, 2025 07:07
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 8b06075 to 497a4d0CompareJanuary 31, 2025 19:07
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 497a4d0 to 2a287f4CompareFebruary 11, 2025 06:26
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch 2 times, most recently from f41fa68 to ce18383CompareMarch 11, 2025 23:50
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch 2 times, most recently from a4ffb79 to d39030fCompareMarch 19, 2025 00:04
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch 2 times, most recently from e830ada to 3af758dCompareApril 10, 2025 20:05
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.3.4Update dependency @vitejs/plugin-react to v4.4.0Apr 17, 2025
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 3af758d to 8ff2c44CompareApril 17, 2025 23:48
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.4.0Update dependency @vitejs/plugin-react to v4.4.1Apr 19, 2025
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 8ff2c44 to 4f96ed1CompareApril 19, 2025 15:25
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 4f96ed1 to 2d29bcdCompareApril 27, 2025 00:01
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 2d29bcd to ff41949CompareMay 24, 2025 11:57
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.4.1Update dependency @vitejs/plugin-react to v4.5.0May 24, 2025
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch 2 times, most recently from 9ab1e90 to 432ecf1CompareJune 6, 2025 11:49
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.5.0Update dependency @vitejs/plugin-react to v4.5.1Jun 6, 2025
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.5.1Update dependency @vitejs/plugin-react to v4.5.2Jun 14, 2025
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 432ecf1 to 2159191CompareJune 14, 2025 12:00
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 2159191 to 16ac117CompareJuly 5, 2025 08:11
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.5.2Update dependency @vitejs/plugin-react to v4.6.0Jul 5, 2025
@renovaterenovateBot changed the title Update dependency @vitejs/plugin-react to v4.6.0Update dependency @vitejs/plugin-react to v4.7.0Jul 26, 2025
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 16ac117 to 293dfb7CompareJuly 26, 2025 20:04
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 40d7f2c to 60ed459CompareAugust 21, 2025 03:59
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 60ed459 to 97a481eCompareSeptember 1, 2025 01:20
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 97a481e to 0eec541CompareSeptember 26, 2025 00:12
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 0eec541 to eea41f9CompareOctober 25, 2025 03:52
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from eea41f9 to 4bcca24CompareNovember 8, 2025 08:03
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch 2 times, most recently from ae384ce to 9f7714aCompareNovember 19, 2025 19:51
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 9f7714a to 6c4587eCompareDecember 4, 2025 19:12
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 6c4587e to 05ee5a2CompareJanuary 1, 2026 01:52
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 05ee5a2 to 2089347CompareJanuary 9, 2026 08:05
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch 2 times, most recently from 59e9b2d to 56331a0CompareJanuary 24, 2026 14:53
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 56331a0 to 29a892aCompareFebruary 3, 2026 12:14
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch 2 times, most recently from d484551 to 24cb650CompareFebruary 18, 2026 23:54
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch 2 times, most recently from 3f3fa90 to a504e7cCompareMarch 14, 2026 22:52
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from a504e7c to 50d3f17CompareApril 15, 2026 12:42
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 50d3f17 to fa9d4c8CompareApril 30, 2026 02:29
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from fa9d4c8 to 92000a7CompareMay 13, 2026 03:43
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 92000a7 to 5e26319CompareMay 21, 2026 23:46
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 5e26319 to 1fe6cdeCompareMay 29, 2026 03:45
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 1fe6cde to 0d190dfCompareJune 5, 2026 04:03
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from 0d190df to 0f24784CompareJune 12, 2026 23:44
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch 2 times, most recently from 00e2156 to 1eaccecCompareJuly 24, 2026 08:09
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch 2 times, most recently from 9501cc8 to a18767aCompareAugust 1, 2026 07:38
@renovate
renovateBotforce-pushed the renovate/vitejs-plugin-react-4.x-lockfile branch from a18767a to 2c51e0bCompareAugust 15, 2026 03:44
Sign up for freeto 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