Skip to content
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

🐛: Astro should not blanket-swallow warn messges #528

Closed
jasikpark opened this issue Jun 24, 2021 · 2 comments · Fixed by #537
Closed

🐛: Astro should not blanket-swallow warn messges #528

jasikpark opened this issue Jun 24, 2021 · 2 comments · Fixed by #537
Labels
help wanted Please help with this issue!

Comments

@jasikpark
Copy link
Contributor

I think that was removed in 0.14.0, we shouldn't be swallowing anything anymore.

err... looks like we are doing some console.warn trapping in build(). If you don't mind filing an issue for that, I think that's worth fixing (we could just silence the exact warnings coming from vue, instead of a blanket "swallow all")

Originally posted by @FredKSchott in withastro/docs#17 (comment)

@matthewp matthewp added the help wanted Please help with this issue! label Jun 24, 2021
@matthewp
Copy link
Contributor

matthewp commented Jun 24, 2021

Easy fix for anyone that wants it, you can add a callback here: https://github.com/snowpackjs/astro/blob/d6dfff6000b39f0eecb220214569aec48ff26aeb/packages/astro/src/build.ts#L74

And check for the Vue warning, otherwise call our own logging mechanism. Pseudo-code:

const release = trapWarn((...args) => {
  if(!args[0].includes('some vue message')) {
    warn(logging, 'build', ...args);
  }
})

I'm not sure what the Vue message is, you'll have to disable the trap temporarily to see what it is.

@natemoo-re
Copy link
Member

natemoo-re commented Jun 24, 2021

I think we fixed the Vue warning upstream, actually! We should be able to remove this entirely.

@natemoo-re natemoo-re linked a pull request Jun 24, 2021 that will close this issue
ematipico pushed a commit that referenced this issue Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Please help with this issue!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants