Skip to content

Latest commit

 

History

History
92 lines (50 loc) · 3.22 KB

File metadata and controls

92 lines (50 loc) · 3.22 KB

Changelog

Unreleased

0.4.3 (2025-11-12)

Update code to support newer rolldown-vite (#978)

rolldown-vite will remove optimizeDeps.rollupOptions in favor of optimizeDeps.rolldownOptions soon. This plugin now uses optimizeDeps.rolldownOptions to support newer rolldown-vite. Please update rolldown-vite to the latest version if you are using an older version.

0.4.2 (2025-09-17)

Perf: simplify refresh wrapper generation (#835)

0.4.1 (2025-08-19)

Set optimizeDeps.rollupOptions.transform.jsx instead of optimizeDeps.rollupOptions.jsx (#735)

optimizeDeps.rollupOptions.jsx is going to be deprecated in favor of optimizeDeps.rollupOptions.transform.jsx.

0.4.0 (2025-08-07)

0.4.0-beta.0 (2025-07-28)

Deprecate this plugin

The changes of this plugin is now included in @vitejs/plugin-react. Please use @vitejs/plugin-react instead.

Allow processing files in node_modules

The default value of exclude options is now [/\/node_modules\//] to allow processing files in node_modules directory. It was previously [] and files in node_modules was always excluded regardless of the value of exclude option.

Require Node 20.19+, 22.12+

This plugin now requires Node 20.19+ or 22.12+.

0.3.0 (2025-07-18)

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()
  .map(p => ({ ...p, applyToEnvironment: e => e.name === 'client' }))

0.2.3 (2025-06-16)

Disable refresh transform when server.hmr: false is set #502

This fixes "$RefreshReg$ is not defined" error when running Vitest with the plugin.

0.2.2 (2025-06-10)

Add Vite 7-beta to peerDependencies range #497

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

0.2.1 (2025-06-03)

Add explicit semicolon in preambleCode #485

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

0.2.0 (2025-05-23)

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.

0.1.1 (2025-04-10)

0.1.0 (2025-04-09)

  • Create Oxc plugin