Skip to content

Future warnings when enabling future: 'warn' in Vite 7.2 with @vitejs/plugin-vue2 #116

@thefutureislimitless

Description

@thefutureislimitless

Describe the issue

After upgrading our project to Vite ^7.2.2 we enabled the new future: 'warn' option in defineConfig to track upcoming breaking changes. Starting the dev server shows multiple warnings coming from @vitejs/plugin-vue2:

  • server.warmupRequest is replaced with this.environment.warmupRequest.
  • Plugin hook options.ssr is replaced with this.environment.config.consumer === 'server'.
  • Plugin hook handleHotUpdate() is replaced with hotUpdate().

Each warning links to the Vite documentation detailing the new Environment API changes.

Reproduction

  1. Create a Vue 2.7 project (e.g. via create-vue + downgrade to Vue 2).
  2. Install Vite ^7.2.2 and @vitejs/[email protected].
  3. In vite.config.js add future: 'warn'.
  4. Run pnpm run dev (or vite dev).
  5. Observe the future warnings in the terminal.

Our actual project is a Vue 2.7 + Ant Design Vue admin dashboard, but the reproduction above should be enough.

Expected behavior

@vitejs/plugin-vue2 should migrate to the new Environment-aware hooks (hotUpdate, this.environment.*, etc.) so that enabling future: 'warn' emits no warnings.

Additional context

  • Vite: ^7.2.2
  • @vitejs/plugin-vue2: 2.3.4
  • Node: 24.11.0
  • Package manager: pnpm 10.20.0

Thanks!

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions