Skip to content

Commit

Permalink
chore(deps): update dependency @vitejs/plugin-react to v4 (#31)
Browse files Browse the repository at this point in the history
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#readme) ([source](https://github.com/vitejs/vite-plugin-react)) | [`^3.1.0` -> `^4.0.0`](https://renovatebot.com/diffs/npm/@vitejs%2fplugin-react/3.1.0/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/4.0.0/compatibility-slim/3.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/4.0.0/confidence-slim/3.1.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>vitejs/vite-plugin-react</summary>

### [`v4.0.0`](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#&#8203;400-2023-04-20)

[Compare Source](https://github.com/vitejs/vite-plugin-react/compare/cda8145b8dc5a7211c0e3f8a253b4cac9c2c3d42...f87d23e91fa48b8a8488dd8bee5277070f5fc3c2)

This major version include a revamp of options:

-   `include`/`exclude` now allow to completely override the files processed by the plugin ([#&#8203;122](https://github.com/vitejs/vite-plugin-react/pull/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:

```js
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 [#&#8203;16](https://github.com/vitejs/vite-plugin-react/issues/16)).

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

-   `fastRefresh` is removed ([#&#8203;122](https://github.com/vitejs/vite-plugin-react/pull/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. ([#&#8203;129](https://github.com/vitejs/vite-plugin-react/pull/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 ([#&#8203;141](https://github.com/vitejs/vite-plugin-react/issues/141))
-   Wrap dynamic import to speedup analysis ([#&#8203;143](https://github.com/vitejs/vite-plugin-react/issues/143))

Other notable changes:

-   Silence "use client" warning ([#&#8203;144](https://github.com/vitejs/vite-plugin-react/pull/144), fix [#&#8203;137](https://github.com/vitejs/vite-plugin-react/issues/137))
-   Fast Refresh is applied on JS files using automatic runtime ([#&#8203;122](https://github.com/vitejs/vite-plugin-react/pull/122), fix [#&#8203;83](https://github.com/vitejs/vite-plugin-react/issues/83))
-   Vite 4.2 is required as a peer dependency ([#&#8203;128](https://github.com/vitejs/vite-plugin-react/pull/128))
-   Avoid key collision in React refresh registration ([a74dfef](https://github.com/vitejs/vite-plugin-react/commit/a74dfef), fix [#&#8203;116](https://github.com/vitejs/vite-plugin-react/issues/116))
-   Throw when refresh runtime is loaded twice ([#&#8203;108](https://github.com/vitejs/vite-plugin-react/pull/108), fix [#&#8203;101](https://github.com/vitejs/vite-plugin-react/issues/101))
-   Don't force optimization of jsx-runtime ([#&#8203;132](https://github.com/vitejs/vite-plugin-react/pull/132))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone Europe/Berlin, 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 has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/mheob/ef-calc).
  • Loading branch information
renovate[bot] authored May 6, 2023
1 parent 5a74e02 commit ae1b60c
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 96 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@types/node": "^18.16.2",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.1",
"@vitejs/plugin-react": "^3.1.0",
"@vitejs/plugin-react": "^4.0.0",
"eslint": "^8.39.0",
"prettier": "^2.8.8",
"typescript": "^5.0.4",
Expand Down
180 changes: 85 additions & 95 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit ae1b60c

@vercel
Copy link

@vercel vercel bot commented on ae1b60c May 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ef-calc – ./

ef-calculator.vercel.app
ef-calc-git-main-mheob.vercel.app
ef-calc-mheob.vercel.app

Please sign in to comment.