Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

chore(deps): update dependency vite to v4 #23

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 12, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
vite (source) 3.1.0 -> 4.2.1 age adoption passing confidence

Release Notes

vitejs/vite

v4.2.1

Compare Source

v4.2.0

Compare Source

Vite 4.2 is out!

Support env variables replacement in HTML files

Vite now supports replacing env variables in HTML files. Any properties in import.meta.env can be used in HTML files with a special %ENV_NAME% syntax:

<h1>Vite is running in %MODE%</h1>
<p>Using data from %VITE_API_URL%</p>
Sourcemaps improvements

The Chrome Dev Tools team has been working to improve the DX of Vite and Vite-powered frameworks in the dev tools. Vite 4.2 brings an improved experience and tools for framework authors to hide 3rd party code and build artifacts from the user from console log traces using server.sourcemapIgnoreList and build.rollupOptions.output.sourcemapIgnoreList.

ESM subpath imports

Vite 4.2 now supports subpath imports, thanks to @​lukeed05's resolve.exports library.

TypeScript 5 support

Vite 4.2 also supports TypeScript 5's tsconfig extends array format, thanks to tsconfck.

esbuild 0.17

esbuild v0.17.0 improved the design of its incremental, watch, and serve APIs. Check out #​11908 for the rationale of why we didn't consider the backward-incompatible changes breaking for our use cases. The updated esbuild design now allows Vite to properly cancel in-fly builds and improve server restarts.

Use Rollup types from the vite package

Expose Rollup types as a namespace. This is helpful to avoid type conflicts because of different versions of Rollup types in environments like vite-ecosystem-ci (#​12316).

import type { Rollup } from 'vite'
Português Docs Translation

The Vite documentation is now translated to Português at pt.vitejs.dev thanks to Nazaré Da Piedade .

Features
Bug Fixes
Previous Changelogs
4.2.0-beta.2 (2023-03-13)

See 4.2.0-beta.2 changelog

4.2.0-beta.1 (2023-03-07)

See 4.2.0-beta.1 changelog

4.2.0-beta.0 (2023-02-27)

See 4.2.0-beta.0 changelog

v4.1.4

Compare Source

v4.1.3

Compare Source

v4.1.2

Compare Source

v4.1.1

Compare Source

v4.1.0

Compare Source

Vite 4.1 updates to the latest versions of Rollup and esbuild. Check out the new Rollup docs, that are now powered by VitePress making the navigation between Vite and Rollup docs easier for users.

Vite docs got a theme update migrating to the latest version of VitePress.

As part of Vite 4, the Vue and React plugins have been extracted out of the monorepo. Although their release cycle will no longer follow Vite releases moving forward, Vite 4.1 is released in parallel with new versions of @​vitejs/plugin-react and @​vitejs/plugin-react-swc. @​vitejs/plugin-react 3.1.0 reworks the way HMR is handled fixing many edge cases and @​vitejs/plugin-react-swc 3.1.0 adds support for SWC plugins.

There is also a new major for @​vitejs/plugin-legacy, see changelog for v4.0.0. This version contains breaking changes:

Features
Bug Fixes
Previous Changelogs
4.1.0-beta.2 (2023-02-01)

See 4.1.0-beta.2 changelog

4.1.0-beta.1 (2023-01-26)

See 4.1.0-beta.1 changelog

4.1.0-beta.0 (2023-01-09)

See 4.1.0-beta.0 changelog

v4.0.4

Compare Source

v4.0.3

Compare Source

v4.0.2

Compare Source

v4.0.1

Compare Source

v4.0.0

Compare Source

Vite 4 Announcement Cover Image

Read the announcement blog post: Announcing Vite 4

Quick links:

Docs in other languages:

Main Changes

This major is smaller in scope compared to Vite 3, with the main objective of upgrading to Rollup 3. We've worked with the ecosystem to ensure a smooth upgrade path for this new major.

Rollup 3

Vite is now using Rollup 3, which allowed us to simplify Vite's internal asset handling and has many improvements. See the Rollup 3 release notes here.

Framework Plugins out of the Vite core monorepo

@vitejs/plugin-vue and @vitejs/plugin-react have been part of Vite core monorepo since the first versions of Vite. This helped us to get a close feedback loop when making changes as we were getting both Core and the plugins tested and released together. With vite-ecosystem-ci we can get this feedback with these plugins developed on independent repositories, so from Vite 4, they have been moved out of the Vite core monorepo. This is meaningful for Vite's framework-agnostic story, and will allow us to build independent teams to maintain each of the plugins. If you have bugs to report or features to request, please create issues on the new repositories moving forward: vitejs/vite-plugin-vue and vitejs/vite-plugin-react.

New React plugin using SWC during development

SWC is now a mature replacement for Babel, especially in the context of React projects. SWC's React Fast Refresh implementation is a lot faster than Babel, and for some projects, it is now a better alternative. From Vite 4, two plugins are available for React projects with different tradeoffs. We believe that both approaches are worth supporting at this point, and we'll continue to explore improvements to both plugins in the future.

@​vitejs/plugin-react

@​vitejs/plugin-react is a plugin that uses esbuild and Babel, achieving fast HMR with a small package footprint and the flexibility of being able to use the babel transform pipeline.

@​vitejs/plugin-react-swc (new)

@​vitejs/plugin-react-swc is a new plugin that uses esbuild during build, but replaces Babel with SWC during development. For big projects that don't require non-standard React extensions, cold start and Hot Module Replacement (HMR) can be significantly faster.

Compatibility

The modern browser build now targets safari14 by default for wider ES2020 compatibility (https://github.com/vitejs/vite/issues/9063). This means that modern builds can now use BigInt and that the nullish coallessing operator isn't transpiled anymore. If you need to support older browsers, you can add @vitejs/plugin-legacy as usual.

Importing CSS as a string

In Vite 3, importing the default export of a .css file could introduce a double loading of CSS.

import cssString from './global.css';

This double loading could occur since a .css file will be emitted and it's likely that the CSS string will also be used by the application code — for example, injected by the framework runtime. From Vite 4, the .css default export has been deprecated. The ?inline query suffix modifier needs to be used in this case, as that doesn't emit the imported .css styles.

import stuff from './global.css?inline'
Other features
  • Support for patch-package when pre bundling dependencies (#​10286)
  • Cleaner build logs output (#​10895) and switch to kB to align with browser dev tools (#​10982)
  • Improved error messages during SSR (#​11156)
Features

Configuration

📅 Schedule: Branch creation - "before 3am on Monday" (UTC), 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. View repository job log here.

@renovate
Copy link
Contributor Author

renovate bot commented Dec 12, 2022

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: pnpm-lock.yaml
installing v2 tool node v18.15.0
linking tool node v18.15.0
node: v18.15.0 /usr/local/bin/node
npm: 9.5.0  /usr/local/bin/npm
Installed v2 /usr/local/buildpack/tools/v2/node.sh in 2 seconds
installing v2 tool pnpm v7.11.0
linking tool pnpm v7.11.0
7.11.0
Installed v2 /usr/local/buildpack/tools/v2/pnpm.sh in 2 seconds
Scope: all 6 workspace projects

   ╭─────────────────────────────────────────────────────────────────╮
   │                                                                 │
   │                Update available! 7.11.0 → 8.1.0.                │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v8.1.0   │
   │                Run "pnpm add -g pnpm" to update.                │
   │                                                                 │
   │     Follow @pnpmjs for updates: https://twitter.com/pnpmjs      │
   │                                                                 │
   ╰─────────────────────────────────────────────────────────────────╯

Progress: resolved 1, reused 0, downloaded 0, added 0
Progress: resolved 18, reused 0, downloaded 9, added 0
Progress: resolved 53, reused 0, downloaded 42, added 0
Progress: resolved 92, reused 0, downloaded 70, added 0
Progress: resolved 148, reused 0, downloaded 125, added 0
Progress: resolved 209, reused 0, downloaded 168, added 0
Progress: resolved 251, reused 0, downloaded 197, added 0
.                                        |  WARN  deprecated sourcemap-codec@1.4.8
Progress: resolved 322, reused 0, downloaded 252, added 0
Progress: resolved 421, reused 0, downloaded 335, added 0
Progress: resolved 526, reused 0, downloaded 433, added 0
Progress: resolved 526, reused 0, downloaded 484, added 0
 ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies

.
└─┬ unocss 0.45.18
  └─┬ @unocss/astro 0.45.18
    └─┬ @unocss/vite 0.45.18
      └── ✕ unmet peer vite@"^2.9.0 || ^3.0.0-0": found 4.2.1

example/vue
├─┬ vue-router 4.1.5
│ └── ✕ missing peer vue@^3.2.0
├─┬ @vitejs/plugin-vue 3.1.0
│ ├── ✕ missing peer vue@^3.2.25
│ └── ✕ missing peer vite@^3.0.0
└─┬ unocss 0.45.18
  └─┬ @unocss/astro 0.45.18
    └─┬ @unocss/vite 0.45.18
      └── ✕ missing peer vite@"^2.9.0 || ^3.0.0-0"
Peer dependencies that should be installed:
  vite@">=3.0.0 <4.0.0"
  vue@">=3.2.25 <4.0.0"

packages/button
├─┬ @vitejs/plugin-vue 3.1.0
│ ├── ✕ missing peer vite@^3.0.0
│ └── ✕ missing peer vue@^3.2.25
└─┬ unocss 0.45.30
  └─┬ @unocss/astro 0.45.30
    └─┬ @unocss/vite 0.45.30
      └── ✕ missing peer vite@"^2.9.0 || ^3.0.0-0"
Peer dependencies that should be installed:
  vite@">=3.0.0 <4.0.0"
  vue@^3.2.25

packages/grid
├─┬ @vitejs/plugin-vue 3.1.0
│ ├── ✕ missing peer vite@^3.0.0
│ └── ✕ missing peer vue@^3.2.25
└─┬ unocss 0.45.30
  └─┬ @unocss/astro 0.45.30
    └─┬ @unocss/vite 0.45.30
      └── ✕ missing peer vite@"^2.9.0 || ^3.0.0-0"
Peer dependencies that should be installed:
  vite@">=3.0.0 <4.0.0"
  vue@^3.2.25

hint: If you want peer dependencies to be automatically installed, add "auto-install-peers=true" to an .npmrc file at the root of your project.
hint: If you don't want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.


@renovate renovate bot changed the title chore(deps): update dependency vite to v4 Update dependency vite to v4 Dec 17, 2022
@renovate renovate bot changed the title Update dependency vite to v4 chore(deps): update dependency vite to v4 Dec 17, 2022
@renovate renovate bot force-pushed the renovate/vite-4.x branch 2 times, most recently from 069be24 to 5868767 Compare December 21, 2022 16:15
@renovate renovate bot force-pushed the renovate/vite-4.x branch 2 times, most recently from dd578ae to 55231cf Compare February 2, 2023 17:15
@renovate renovate bot force-pushed the renovate/vite-4.x branch 3 times, most recently from d3aabbb to d609231 Compare February 22, 2023 00:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants