Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump @vitejs/plugin-react from 3.1.0 to 4.0.0 #410

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 21, 2023

Bumps @vitejs/plugin-react from 3.1.0 to 4.0.0.

Release notes

Sourced from @​vitejs/plugin-react's releases.

[email protected]

Options changes

include/exclude

These options now allow to completely override the files processed by the plugin (#122). This is more in line with other Rollup/Vite plugins and simplify the setup of enabling Fast Refresh for .mdx files. This can be done like this:

export default defineConfig({
  plugins: [
    { enforce: 'pre', ...mdx() },
    react({ include: /\.(mdx|js|jsx|ts|tsx)$/ }),
  ],
})

These changes also allow to apply Babel plugins on files outside Vite root (expect in node_modules), which improve support for monorepo (fix #16).

With these changes, only the file extensions is used for filtering processed files and the query param fallback is removed.

jsxRuntime

The support for React auto import when using classic runtime is removed. This was prone to errors and added complexity for no good reason given the very wide support of automatic runtime nowadays. This migration path should be as simple as removing the runtime option from the config.

Removed options

  • fastRefresh (#122) This should be correctly activated by plugin without configuration.
  • jsxPure (#129) This is a niche use case that was just passing down the boolean to esbuild.jsxSideEffects.

Perf

This release goes in hand with the upcoming Vite 4.3 release focusing on performances:

  • Cache plugin load (#141)
  • Wrap dynamic import to speedup analysis (#143)

Other notable changes

  • Silence "use client" warning (#144, fix #137)
  • Fast Refresh is applied on JS files using automatic runtime (#122, fix #83)
  • Vite 4.2 is required as a peer dependency (#128)
  • Avoid key collision in React refresh registration (a74dfef, fix #116)
  • Throw when refresh runtime is loaded twice (#108, fix #101)
  • Don't force optimization of jsx-runtime (#132)

[email protected]

fix: add jsx dev runtime to optimizeDeps (#147)

[email protected]

This major version include a revamp of options:

... (truncated)

Changelog

Sourced from @​vitejs/plugin-react's changelog.

4.0.0 (2023-04-20)

This major version include a revamp of options:

  • include/exclude now allow to completely override the files processed by the plugin (#122). This is more in line with other Rollup/Vite plugins and simplify the setup of enabling Fast Refresh for .mdx files. This can be done like this:
export default defineConfig({
  plugins: [
    { enforce: 'pre', ...mdx() },
    react({ include: /\.(mdx|js|jsx|ts|tsx)$/ }),
  ],
})

These changes also allow to apply Babel plugins on files outside Vite root (expect in node_modules), which improve support for monorepo (fix #16).

With these changes, only the file extensions is used for filtering processed files and the query param fallback is removed.

  • fastRefresh is removed (#122). This should be correctly activated by plugin without configuration.
  • jsxPure is removed. This is a niche use case that was just passing down the boolean to esbuild.jsxSideEffects. (#129)

The support for React auto import whe using classic runtime is removed. This was prone to errors and added complexity for no good reason given the very wide support of automatic runtime nowadays. This migration path should be as simple as removing the runtime option from the config.

This release goes in hand with the upcoming Vite 4.3 release focusing on performances:

  • Cache plugin load (#141)
  • Wrap dynamic import to speedup analysis (#143)

Other notable changes:

  • Silence "use client" warning (#144, fix #137)
  • Fast Refresh is applied on JS files using automatic runtime (#122, fix #83)
  • Vite 4.2 is required as a peer dependency (#128)
  • Avoid key collision in React refresh registration (a74dfef, fix #116)
  • Throw when refresh runtime is loaded twice (#108, fix #101)
  • Don't force optimization of jsx-runtime (#132)

4.0.0-beta.1 (2023-04-17)

4.0.0-beta.0 (2023-04-05)

This major version include a revamp of options:

  • include/exclude now allow to completely override the files processed by the plugin (#122). This is more in line with other Rollup/Vite plugins and simplify the setup of enabling Fast Refresh for .mdx files. This can be done like this:
export default defineConfig({
</tr></table> 

... (truncated)

Commits

Dependabot compatibility score

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 commands and options

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

Bumps [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) from 3.1.0 to 4.0.0.
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/[email protected]/packages/plugin-react)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants