Skip to content

Releases: vitejs/vite-plugin-react

[email protected]

19 Apr 12:11
Compare
Choose a tag to compare

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

[email protected]

15 Apr 09:22
[email protected]
8beda4f
Compare
Choose a tag to compare

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.

[email protected]

15 Apr 09:22
[email protected]
4a94448
Compare
Choose a tag to compare

Make compatible with rolldown-vite

This plugin is now compatible with rolldown-powered version of Vite.

[email protected]

15 Apr 04:02
[email protected]
c197fd9
Compare
Choose a tag to compare
[email protected] Pre-release
Pre-release

Add reactRefreshHost option

Add reactRefreshHost option to set a React Fast Refresh runtime URL prefix.
This is useful in a module federation context to enable HMR by specifying the host application URL in the Vite config of a remote application.
See full discussion here: module-federation/vite#183 (comment)

export default defineConfig({
  plugins: [react({ reactRefreshHost: 'http://localhost:3000' })],
})

[email protected]

15 Apr 04:06
[email protected]
ae2ed7b
Compare
Choose a tag to compare
[email protected] Pre-release
Pre-release

Add reactRefreshHost option

Add reactRefreshHost option to set a React Fast Refresh runtime URL prefix.
This is useful in a module federation context to enable HMR by specifying the host application URL in the Vite config of a remote application.
See full discussion here: module-federation/vite#183 (comment)

export default defineConfig({
  plugins: [react({ reactRefreshHost: 'http://localhost:3000' })],
})

[email protected]

10 Apr 09:59
[email protected]
9bde677
Compare
Choose a tag to compare
[email protected] Pre-release
Pre-release
[email protected]

[email protected]

09 Apr 10:41
[email protected]
da01d56
Compare
Choose a tag to compare
[email protected] Pre-release
Pre-release
[email protected]

[email protected]

09 Apr 10:48
[email protected]
c02385d
Compare
Choose a tag to compare
[email protected] Pre-release
Pre-release
[email protected]

[email protected]

26 Nov 11:04
Compare
Choose a tag to compare

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" })

[email protected]

19 Oct 16:08
Compare
Choose a tag to compare

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
export default defineConfig(({ command }) => {
  const babelPlugins = [['babel-plugin-react-compiler', { target: '18' }]]
  if (command === 'serve') {
    babelPlugins.push(['@babel/plugin-transform-react-jsx-development', {}])
  }

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