fix(vue): run devtools plugins only in the client environment - #17515
Open
barry166 wants to merge 1 commit into
Open
fix(vue): run devtools plugins only in the client environment#17515barry166 wants to merge 1 commit into
barry166 wants to merge 1 commit into
Conversation
Vite 8 processes Astro SSR modules before the client CSS cache is initialized. Confining Vue devtools plugins to the client environment preserves their browser behavior while keeping their styled overlay out of SSR. Constraint: Vite 8 dev environments initialize CSS state per environment Rejected: Disable Vue devtools entirely | removes a supported development feature Confidence: high Scope-risk: narrow Directive: Keep browser-only devtools plugins out of Astro SSR environments Tested: @astrojs/vue build; 24 integration tests; Biome; diff check Not-tested: Browser interaction with the devtools overlay
🦋 Changeset detectedLatest commit: 38b6702 The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Fixes #17494.
vite-plugin-vue-devtoolsto Vite'sclientenvironment.vue({ devtools: true })enabled.@astrojs/vue.Testing
pnpm -C packages/integrations/vue buildpnpm -C packages/integrations/vue test(24 passing)pnpm exec biome check packages/integrations/vue/src/index.ts packages/integrations/vue/test/basics.test.ts packages/integrations/vue/test/fixtures/basics/astro.config.mjsThe new test fails on
mainwith Vite 8'sCannot read properties of undefined (reading 'get')CSS transform error and passes with this change.Docs
No documentation update is needed; this restores the existing
devtools: truebehavior.