Skip to content

define.__VUE_OPTIONS_API__ now breaking some packages on 5.2.2 #549

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

Closed
8 of 9 tasks
chasegiunta opened this issue Mar 17, 2025 · 2 comments
Closed
8 of 9 tasks

define.__VUE_OPTIONS_API__ now breaking some packages on 5.2.2 #549

chasegiunta opened this issue Mar 17, 2025 · 2 comments

Comments

@chasegiunta
Copy link

Related plugins

Describe the bug

define.VUE_OPTIONS_API = false breaks some packages on 5.2.2, where previously it did not on 5.2.1 .

From the docs, this breakage (and risk) is potentially acceptable, but flagging due to the breaking change.

My test case was the Iconify package @iconify/vue

Reproduction

https://stackblitz.com/edit/vitejs-vite-eytuhvxr?file=vite.config.js

Steps to reproduce

  • Install @iconify/vue package

  • Install @vitejs/vue-plugin-vue vue package at 5.2.1

  • Set define.__VUE_OPTIONS_API__ to false

  • Run the vite dev server, import Iconify package and use component package.

  • Observe working

  • Update to @vitejs/vue-plugin-vue vue package to 5.2.2

  • Observe breakage

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @vitejs/plugin-vue: ^5.2.3 => 5.2.3 
    vite: ^6.2.2 => 6.2.2

Used Package Manager

npm

Logs

No response

Validations

@edison1105 edison1105 added bug Something isn't working and removed pending triage labels Mar 18, 2025
@edison1105
Copy link
Member

edison1105 commented Mar 18, 2025

Set define.__VUE_OPTIONS_API__ to false will eventually be resolved to true in v5.2.1, and this issue was fixed in v5.2.2. You need to change false to true if you need to enable the options API.

the Icon using options API, so you need set define.__VUE_OPTIONS_API__ to true
Image

@edison1105 edison1105 removed the bug Something isn't working label Mar 18, 2025
@chasegiunta
Copy link
Author

@edison1105 Understood. I do not personally use Options API in my project, but apparently the Iconify package does. If you're okay with the breaking change, feel free to close. I just wanted to report it just in case.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants