Add `forwardLog` option to NuxtConfiguration

potato4d
168
potato4d
commented 7 months ago

What problem does this feature solve?

in Nuxt v2.7.0 or later, nuxt dev forwards SSR's console.log to the front end.
However, if you have a large number of logs, you do not necessarily want to forward them to the front end.

To that end, it would be nice to be able to turn it off from nuxt.config.js.

What does the proposed changes look like?

  1. Add a flag (Boolan) whether to transfer to NuxtConfiguration
  2. Make a change to make it work properly (I would like to send a Pull Request for it)

thanks.

idea
0
potato4d
168
potato4d
commented 7 months ago

The key name may be better, such as ignoreDevLogs.ssr.

0
potato4d
168
potato4d
commented 7 months ago

I think that there is something like this.
https://github.com/potato4d/nuxt.js/commit/6ea30805375e17184d2d7842232b7dab9abb7c33

Also, is it better to be able to change other logs? (I think that another discussion is necessary)

0
clarkdo
12.7k
clarkdo
commented 7 months ago

@potato4d The SSR log has been put into a group by #5770 , so it can be collapsed now, does it meet your requirement ?

0
potato4d
168
potato4d
commented 7 months ago

@clarkdo
I will check it within a few days!
thanks

0
clarkdo
12.7k
clarkdo
commented 7 months ago

@potato4d I proposed a pr for more fine-grained configuration for SSR log

0
Informations
Feature Request โ€ข Open
#c9214 - Created 7 months ago