https://github.com/Freakspot/nuxt-edge-broken
Just run node app.js.
"Test" will never be seen in the console, only "Test 2" will. Imo console.logs prior to the builder should not be cleared.
Additionally, I sometimes get huge empty chunks of whitespace, which I think sometimes happens after rendering new pages? Definitely not 100% reproducable. Also, when the builder is done doing its magic, I'll have a lot of "Compiling..." in the console which imo also shouldn't happen. See this gif: https://gph.is/2v17gSP
Clean output
Unnecessary clutter, whitespace and deletion of console.logs
I've seen this behaviour as well, we will look at it with @clarkdo, thank you @Freakspot
Possibly related: https://github.com/nuxt/webpackbar/issues/13
@Freakspot I suggest you using consola which is the default log utility of Nuxt and it's automatically included by Nuxt.
const { Nuxt, Builder } = require('nuxt-edge');
const nuxt = new Nuxt();
const consola = require('consola')
consola.log('Test');
async function build() {
const builder = new Builder(nuxt);
await builder.build();
}
build();
consola.log('Test 2');
If this doesn't solve your problem, please feel free to ping me, I'll reopen the issue.
@clarkdo Unfortunately you can't always control which logger will be used (example:other plugins/modules) :|
Using consola does indeed solve my problem _in this case_, but I have heard other complaints about this, too, and imo using consola is more of a workaround than an actual solution to this problem, similar to how @manniL stated. (console.log is also included with nuxt. :stuck_out_tongue:)
Thanks for providing this workaround tho, I really appreciate it!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I've seen this behaviour as well, we will look at it with @clarkdo, thank you @Freakspot