Skip to content

Commit

Permalink
chore(deps-dev): bump @vitejs/plugin-react from 4.2.1 to 4.3.1 (#7)
Browse files Browse the repository at this point in the history
Bumps
[@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react)
from 4.2.1 to 4.3.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite-plugin-react/releases"><code>@​vitejs/plugin-react</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v4.3.1</h2>
<h3>Fix support for React Compiler with React 18</h3>
<p>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 <code>runtimeModule</code>: <a
href="https://gist.github.com/poteto/37c076bf112a07ba39d0e5f0645fec43">https://gist.github.com/poteto/37c076bf112a07ba39d0e5f0645fec43</a></p>
<p>When using a custom <code>runtimeModule</code>, the plugin will not
try to pre-optimize <code>react/compiler-runtime</code> dependency.</p>
<p>Reminder: Vite expect code outside of <code>node_modules</code> to be
ESM, so you will need to update the gist with <code>import React from
'react'</code>.</p>
<h2>v4.3.0</h2>
<h3>Fix support for React compiler</h3>
<p>Don't set <code>retainLines: true</code> 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 <a
href="https://github.com/ArnaudBarre/vite-plugin-react-click-to-component">vite-plugin-react-click-to-component</a>
to work, you should update your config to something like:</p>
<pre lang="ts"><code>export default defineConfig(({ command }) =&gt; {
  const babelPlugins = [['babel-plugin-react-compiler', {}]]
  if (command === 'serve') {
babelPlugins.push(['@babel/plugin-transform-react-jsx-development', {}])
  }
<p>return {
plugins: [react({ babel: { plugins: babelPlugins } })],
}
})
</code></pre></p>
<h3>Support HMR for class components</h3>
<p>This is a long overdue and should fix some issues people had with HMR
when migrating from CRA.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md"><code>@​vitejs/plugin-react</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>4.3.1 (2024-06-10)</h2>
<h3>Fix support for React Compiler with React 18</h3>
<p>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 <code>runtimeModule</code>: <a
href="https://gist.github.com/poteto/37c076bf112a07ba39d0e5f0645fec43">https://gist.github.com/poteto/37c076bf112a07ba39d0e5f0645fec43</a></p>
<p>When using a custom <code>runtimeModule</code>, the plugin will not
try to pre-optimize <code>react/compiler-runtime</code> dependency.</p>
<p>Reminder: Vite expect code outside of <code>node_modules</code> to be
ESM, so you will need to update the gist with <code>import React from
'react'</code>.</p>
<h2>4.3.0 (2024-05-22)</h2>
<h3>Fix support for React compiler</h3>
<p>Don't set <code>retainLines: true</code> 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 <a
href="https://github.com/ArnaudBarre/vite-plugin-react-click-to-component">vite-plugin-react-click-to-component</a>
to work, you should update your config to something like:</p>
<pre lang="ts"><code>export default defineConfig(({ command }) =&gt; {
  const babelPlugins = [['babel-plugin-react-compiler', {}]]
  if (command === 'serve') {
babelPlugins.push(['@babel/plugin-transform-react-jsx-development', {}])
  }
<p>return {
plugins: [react({ babel: { plugins: babelPlugins } })],
}
})
</code></pre></p>
<h3>Support HMR for class components</h3>
<p>This is a long overdue and should fix some issues people had with HMR
when migrating from CRA.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitejs/vite-plugin-react/commit/1609186b9f379d4c1cf75c60e878d8b4f7675ab3"><code>1609186</code></a>
release: [email protected]</li>
<li><a
href="https://github.com/vitejs/vite-plugin-react/commit/ea647d19555d52aa194500111a03992e3342a768"><code>ea647d1</code></a>
fix: handle using compiler with React 18 (<a
href="https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react/issues/330">#330</a>)</li>
<li><a
href="https://github.com/vitejs/vite-plugin-react/commit/7e7322a3b7b3364f7efad2d28289f06c86831131"><code>7e7322a</code></a>
release: [email protected]</li>
<li><a
href="https://github.com/vitejs/vite-plugin-react/commit/4b4a95c04fd3b33238e0624d480c3da9c2402634"><code>4b4a95c</code></a>
fix: don't use retainLines with react compiler (<a
href="https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react/issues/319">#319</a>)</li>
<li><a
href="https://github.com/vitejs/vite-plugin-react/commit/2b7f2ae917d1b9627d2d49a3977dc87c30e06a16"><code>2b7f2ae</code></a>
fix: support HMR for class components (<a
href="https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react/issues/320">#320</a>)</li>
<li><a
href="https://github.com/vitejs/vite-plugin-react/commit/302a323b75afc5634c4c4aa5bbf329e9ee7ebcce"><code>302a323</code></a>
docs: add minimum react version (<a
href="https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react/issues/321">#321</a>)</li>
<li><a
href="https://github.com/vitejs/vite-plugin-react/commit/9ebfe68d75577248fbdbcd861614dc2628b9d974"><code>9ebfe68</code></a>
chore: bump deps (<a
href="https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react/issues/318">#318</a>)</li>
<li>See full diff in <a
href="https://github.com/vitejs/vite-plugin-react/commits/v4.3.1/packages/plugin-react">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@vitejs/plugin-react&package-manager=npm_and_yarn&previous-version=4.2.1&new-version=4.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Jul 3, 2024
1 parent 85acbbf commit da3c502
Showing 1 changed file with 147 additions and 204 deletions.
Loading

0 comments on commit da3c502

Please sign in to comment.