-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: suppress console spam for chrome devtools requests #13830
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
Conversation
🦋 Changeset detectedLatest commit: 803ce3a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@@ -573,6 +573,13 @@ export async function respond(request, options, manifest, state) { | |||
// if this request came direct from the user, rather than | |||
// via our own `fetch`, render a 404 page | |||
if (state.depth === 0) { | |||
// In local development, Chrome requests this file for its 'automatic workspace folders' feature, | |||
// causing console spam. TODO should we instead respond with some actual data? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could always delegate to https://github.com/ChromeDevTools/vite-plugin-devtools-json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sent vitejs/awesome-vite#1030 to make it easier to find again if we need to track it down
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to add a TODO. I'm not sure I really need Chrome acting as an editor. lgtm other than that though
Co-authored-by: Ben McCann <[email protected]>
I just tried adding the plugin and it is pretty useful. The plugin is extremely straightforward. I'm tempted to integrate it. Is there any real reason not to? |
Maybe I should give it a try. What did you find useful about it? |
Ah, I hadn't checked Discord yet. Will take a look there |
e7b57e7
into
main
Not sure where to post this, but i just got an unexpected error in my page load method, and the reason was that I have this load function: export const load: PageLoad = async function ({ parent, params }) {
const { githubClient } = await parent();
const { owner, repo, provider } = params;
async function getData() {
const [pullRequests, user] = await Promise.all([
githubClient.getPullRequests(owner, repo),
githubClient.getAuthenticatedUser()
]);
return {
pullRequests,
user
};
}
return {
streamed: {
data: getData()
},
owner,
repo,
provider
};
}; And for some reason provider in my params was Update: It seems that adding https://github.com/ChromeDevTools/vite-plugin-devtools-json fixed it |
please open a new issue |
|
Closes #13743. As an alternative, we might consider responding with some data (which is the intended behaviour), but I'm not familiar with it and we would need to think through any security implications or whatever
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits