Last 12 weeks · 23 commits
4 of 6 standards met
Related plugins [x] plugin-vue [ ] plugin-vue-jsx Describe the bug If and live in the same Vite config, some of my `$RefreshSig$$RefreshReg$@viteReactRefreshjsx.refresh: trueconfig.oxctransformWithOxcuse*useSlots()useRoute()useStore()useuseSlots()`. System Info Used Package Manager pnpm Logs _No response_ Validations [x] Follow our Code of Conduct [x] Read the Contributing Guidelines. [x] Read the docs. [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. [x] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead. [x] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server. [x] The provided reproduction is a minimal reproducible example of the bug.
What is this PR solving? When is present in the same Vite config, it sets globally. The Vue plugin's TS transpilation step in blindly spreads the full into , causing Oxc to inject / into Vue SFCs with `use*useSlots()useRoute()useStore()ReferenceError: $RefreshSig$ is not definedjsx.refreshfalsetargetconfig.oxctargetjsxjsx: undefined.tsxjsx.refreshjsx.refresh@vitejs/plugin-reactrefreshjsxRuntimeimportSource.vueplayground/vue-refresh-bug/vite.config.tsoxc.jsx.refresh = true@vitejs/plugin-reactRefreshBug.vueuseSlots()$RefreshSig$$RefreshReg$pnpm test-servepnpm test-build`): 13 files, 104 tests, zero regressions.
fixes #837 Problem only calls when is non-empty, and only ever gets or . A script-only update therefore leaves holding the descriptor from the last template/style update. decides whether to emit with . If the script is then reverted to exactly the content in that stale baseline, is false, the update is classified as template-only, and the client calls instead of , so keeps the pre-revert state. Fix Push onto when is true, so the descriptor is invalidated (and refreshed) on script updates as well. This is the change suggested in the issue. It does not change which modules are sent. It only keeps the baseline current, and the debug label now includes . Test Added to the playground and an e2e test in the suite that runs the steps from the issue: edit and revert the template, then edit and byte-exactly revert a `Hmr.vueexpected 'changed' to be 'original'pnpm test-serveVITE_TEST_BUILD=1playground/vuepnpm lintpnpm typecheckoxfmt --check`: clean
Related plugins [X] plugin-vue [ ] plugin-vue-jsx Describe the bug The compiler is missing, mutating the but options is a . The SB reproduction will fail with any package manager. On local it works, only failing on StackBlitz, breaking any Nuxt + I18n reproduction... You can check this repository using (instead ) patching the Vue plugin to initialize the compiler properly in the hook: Link to SB in the readme file: https://github.com/userquin/nuxt3-starter-patched-vue-plugin I'm going to send a PR to fix this. Reproduction https://github.com/userquin/nuxt3-starter-patched-vue-plugin Steps to reproduce Just open the URL and await Nuxt start dev server. System Info Used Package Manager npm Logs Validations [X] Follow our Code of Conduct [X] Read the Contributing Guidelines. [X] Read the docs. [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead. [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server. [X] The provided reproduction is a minimal reproducible example of the bug.
Repository: vitejs/vite-plugin-vue. Description: Vite Vue Plugins Stars: 684, Forks: 204. Primary language: TypeScript. Languages: TypeScript (73.9%), JavaScript (12.6%), Vue (11.6%), HTML (1.3%), CSS (0.4%). License: MIT. Latest release: plugin-vue@6.0.9 (2w ago). Open PRs: 29, open issues: 75. Last activity: 16h ago. Community health: 75%. Top contributors: yyx990803, renovate[bot], sapphi-red, patak-cat, sxzz, antfu, Shinigami92, haoqunjiang, bluwy, edison1105 and others.