You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to use Consola during development of a Vue app running locally using the Vite dev server.
The wrapping functionality doesn't seem to work, and I suspect it's because the Vite dev server is confusing Consola into thinking this is a Node app, not a browser?
I get it to sort of work by using code like this in my main.js
console.log=consola.info;
but that feels janky. I am importing consola from the /browser import. I'm not sure if there's a better solution, and if there is then it might be helpful to document it somewhere as I think a lot of the browser users will have something like Vite or Webpack running a hot reloading dev server.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to use Consola during development of a Vue app running locally using the Vite dev server.
The wrapping functionality doesn't seem to work, and I suspect it's because the Vite dev server is confusing Consola into thinking this is a Node app, not a browser?
I get it to sort of work by using code like this in my main.js
but that feels janky. I am importing consola from the /browser import. I'm not sure if there's a better solution, and if there is then it might be helpful to document it somewhere as I think a lot of the browser users will have something like Vite or Webpack running a hot reloading dev server.
Beta Was this translation helpful? Give feedback.
All reactions