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

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

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) ^2.9.15 -> ^4.0.4 age adoption passing confidence

Release Notes

vitejs/vite

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
Bug Fixes
Previous Changelogs
4.0.0-beta.7 (2022-12-08)

See 4.0.0-beta.7 changelog

4.0.0-beta.6 (2022-12-08)

See 4.0.0-beta.6 changelog

4.0.0-beta.5 (2022-12-08)

See 4.0.0-beta.5 changelog

4.0.0-beta.4 (2022-12-07)

See 4.0.0-beta.4 changelog

4.0.0-beta.3 (2022-12-07)

See 4.0.0-beta.3 changelog

4.0.0-beta.2 (2022-12-07)

See 4.0.0-beta.2 changelog

4.0.0-beta.1 (2022-12-06)

See 4.0.0-beta.1 changelog

4.0.0-beta.0 (2022-12-05)

See 4.0.0-beta.0 changelog

4.0.0-alpha.6 (2022-11-30)

See 4.0.0-alpha.6 changelog

4.0.0-alpha.5 (2022-11-22)

See 4.0.0-alpha.5 changelog

4.0.0-alpha.4 (2022-11-17)

See 4.0.0-alpha.4 changelog

4.0.0-alpha.3 (2022-11-15)

See 4.0.0-alpha.3 changelog

4.0.0-alpha.2 (2022-11-13)

See 4.0.0-alpha.2 changelog

4.0.0-alpha.1 (2022-11-12)

See 4.0.0-alpha.1 changelog

4.0.0-alpha.0 (2022-11-07)

See 4.0.0-alpha.0 changelog

v3.2.5

Compare Source

v3.2.4

Compare Source

v3.2.3

Compare Source

v3.2.2

Compare Source

v3.2.1

Compare Source

v3.2.0

Compare Source

Main Changes
Multiple Entries for Library Mode

Library mode now supports multiple entries:

  lib: {
    entry: {
        primary: 'src/index.ts',
        secondary: 'src/secondary.ts'
    },
    formats: ['es', 'cjs']
  }
  // => primary.es.js, primary.cjs.js, secondary.es.js, secondary.cjs.js

Check out the PR #​7047, and the build.lib config docs

build.modulePreload options

Vite now allows filtering and modifying module preload dependencies for each entry and async chunk. experimental.renderBuiltUrl will also get called for preload asset paths. And build.modulePreload.resolveDependencies will be called both for JS dynamic imports preload lists and also for HTML preload lists for chunks imported from entry HTML files. Refer to the PR for more context #​9938 and check out the modulePreload config docs. Note: build.modulePreloadPolyfill is now deprecated, please migrate to build.modulePreload.polyfill.

Include Duplicate Assets in the Manifest

Laravel and other backends integrations will now get entries for every asset file, even if they have been de-duplicated. See #​9928 for more information.

Customizable ErrorOverlay

You can now customize the ErrorOverlay by using css parts. Check out the PR for more details: #​10234.

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.

@netlify
Copy link

netlify bot commented Dec 12, 2022

Deploy Preview for esti ready!

Name Link
🔨 Latest commit d3a5ff3
🔍 Latest deploy log https://app.netlify.com/sites/esti/deploys/63b44d12fac6d2000872ac6a
😎 Deploy Preview https://deploy-preview-46--esti.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@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 c37ab06 to c13edeb Compare December 21, 2022 15:40
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.

None yet

0 participants