diff --git a/capture/fixture/nuxt.config.ts b/capture/fixture/nuxt.config.ts index 282f9de59..4497cacba 100644 --- a/capture/fixture/nuxt.config.ts +++ b/capture/fixture/nuxt.config.ts @@ -5,4 +5,11 @@ export default defineNuxtConfig({ tasks: true, }, }, + vite: { + // Pre-bundled so Vite never discovers it while serving the first request: + // whether it does depends on timing, and its hint would flip the captures. + optimizeDeps: { + include: ['@vue/devtools-core'], + }, + }, }) diff --git a/capture/lib/frames.spec.ts b/capture/lib/frames.spec.ts index b90bcb565..93a2cf78f 100644 --- a/capture/lib/frames.spec.ts +++ b/capture/lib/frames.spec.ts @@ -110,6 +110,12 @@ describe('scrubbing a right-aligned tag', () => { expect(result.styles).toHaveLength(result.line.length) }) + it.each(['⠋ Setting up modules 1.2s · total 3.4s', '⠋ Setting up modules 1.2s · 3.4s', '⠋ Setting up modules 3.4s'])('should pin a phase line however the clocks differed: %s', (line) => { + const styles = Array.from({ length: line.length }).fill(undefined) as never + + expect(scrubLine(line, styles, resolveRules(['timings'])).line).toBe('⠋ Setting up modules 42 ms') + }) + it('should leave a line without padding alone', () => { expect(scrub('42 ms').trimEnd()).not.toBe('') const plain = '✔ Vite client built in 1085 ms' diff --git a/capture/lib/scrub.ts b/capture/lib/scrub.ts index 67196ab38..e24eec22b 100644 --- a/capture/lib/scrub.ts +++ b/capture/lib/scrub.ts @@ -50,7 +50,7 @@ const RULES: Record = { { pattern: /\b\d+(?:\.\d+)?\s?s(?![a-z])/g, replacement: () => '42 ms' }, // A phase clock is only printed beside the total once they differ, so // the pair is a function of machine speed and carries nothing once pinned. - { pattern: /42 ms \u00B7 42 ms/g, replacement: () => '42 ms' }, + { pattern: /42 ms \u00B7 (?:total )?42 ms/g, replacement: () => '42 ms' }, ], }, versions: { diff --git a/capture/output/nuxt-dev-install-module.svg b/capture/output/nuxt-dev-install-module.svg index 8f0f4bf8f..f2f6621b6 100644 --- a/capture/output/nuxt-dev-install-module.svg +++ b/capture/output/nuxt-dev-install-module.svg @@ -16,55 +16,47 @@ svg{--bg:#ffffff;--fg:#24292f;--chrome:#f6f8fa;--dot:#d0d7de} nuxt dev (module auto-install) -⣠⣦⣠⡀Nuxt4.6.1━━━━━━━━━━━━━━━━━━━━0% · 0.0ms STARTING preparing your apprrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/⠋━━━━━━━━━━━━━━━━━━━━0% · 0.0ms STARTING starting Nuxt...oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━17% · 153ms STARTING setting up modulesoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━33% · 323ms STARTING preparing appoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━33% · 509ms STARTING preparing appoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━50% · 685ms STARTING generating typesoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━50% · 748ms STARTING generating typesoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━67% · 972ms STARTING bundling appoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 1.13s STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 1.22s STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 1.34s STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 1.46s STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 1.58s STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 1.71s STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 1.83s STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 1.95s STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⚠ 1 warning READY watching for changesrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○No -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }})Learn more: https://vite.dev/guide/dep-pre-bundling.html -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠴ installing with npm · 0.0ms READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠦ installing with npm · 96ms READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠧ installing with npm · 217ms READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠇ installing with npm · 337ms READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠏ installing with npm · 458ms READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠋ installing with npm · 578ms READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠙ installing with npm · 698ms READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠹ installing with npm · 818ms READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠸ installing with npm · 938ms READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠼ installing with npm · 1.05s READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠴ installing with npm · 1.17s READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠦ installing with npm · 1.29s READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠧ installing with npm · 1.41s READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠇ installing with npm · 1.53s READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠏ installing with npm · 1.65s READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠋ installing with npm · 1.77s READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠙ installing with npm · 1.90s READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠹ installing with npm · 2.02s READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠸ installing with npm · 2.14s READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/⠼ installing @nuxt/scripts... · 2.30s READY ✔dependencies installed · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━17% · 52ms BUILDING ✔dependencies installed · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━50% · 130ms BUILDING ✔dependencies installed · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━67% · 241ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 308ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 422ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 544ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 686ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 809ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 932ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/✔ 1 request 108ms median READY ✔installed @nuxt/scripts · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit -❯ Do you want to install @nuxt/scripts package?● Yes /○Noℹ Vite discovered new dependencies at runtime:@vue/devtools-core← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.jsPre-bundle them in your nuxt.config.ts to avoid page reloads:export default defineNuxtConfig({ vite: { optimizeDeps: { include: [ '@vue/devtools-core', ] } }✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.1ready in 2.48sLocalhttp://localhost:3000/✔ 1 request 108ms median READY watching for changes · GET /scripts · 200 · 108msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2━━━━━━━━━━━━━━━━━━━━0% · 0.0ms STARTING preparing your apprrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/⠋━━━━━━━━━━━━━━━━━━━━0% · 0.0ms STARTING starting Nuxt...oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━17% · 96ms STARTING setting up modulesoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━33% · 193ms STARTING preparing appoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━33% · 304ms STARTING preparing appoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━50% · 435ms STARTING generating typesoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━67% · 580ms STARTING bundling appoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 701ms STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 821ms STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 942ms STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 1.07s STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 1.19s STARTING building serveroopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/⚠ 1 warning STARTING preparing your appoopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⚠ 1 warning READY watching for changesrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +❯ Do you want to install @nuxt/scripts package?● Yes /○No +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠋ installing with npm · 0.0ms READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠙ installing with npm · 104ms READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠹ installing with npm · 225ms READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠸ installing with npm · 346ms READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠼ installing with npm · 466ms READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠴ installing with npm · 587ms READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠦ installing with npm · 706ms READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠧ installing with npm · 827ms READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠇ installing with npm · 948ms READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠏ installing with npm · 1.06s READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠋ installing with npm · 1.19s READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠙ installing with npm · 1.31s READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠹ installing with npm · 1.43s READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠸ installing with npm · 1.55s READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠼ installing with npm · 1.67s READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠴ installing with npm · 1.79s READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠦ installing with npm · 1.91s READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠧ installing with npm · 2.03s READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/⠇ installing with npm · 2.15s READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━0% · 0.0ms BUILDING ✔dependencies installed · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━50% · 86ms BUILDING ✔dependencies installed · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 156ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 208ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 328ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2Localhttp://localhost:3000/━━━━━━━━━━━━━━━━━━━━83% · 472ms BUILDING ✔installed @nuxt/scripts · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/✔ 1 request 70ms median READY ✔installed @nuxt/scripts · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit +✔ Do you want to install @nuxt/scripts package?Yes⣠⣦⣠⡀Nuxt4.6.2ready in 1.56sLocalhttp://localhost:3000/✔ 1 request 70ms median READY watching for changes · GET /scripts · 200 · 70msrrestart · oopen · iinfo · llogs · nnetwork · proutes · ?help · qquit diff --git a/capture/output/nuxt-dev-install-module.txt b/capture/output/nuxt-dev-install-module.txt index dae5d6b1d..b44662fcb 100644 --- a/capture/output/nuxt-dev-install-module.txt +++ b/capture/output/nuxt-dev-install-module.txt @@ -1,9 +1,4 @@ -styles: a057ea820f39fe11 - '@vue/devtools-core', - ] - include: [ - optimizeDeps: { - } +styles: c631b1f09ab5adaa Local http://localhost:3000/ Local http://localhost:3000/ ⠋ ━━━━━━━━━━━━━━━━━━━━ 0% · 42 ms @@ -18,7 +13,6 @@ styles: a057ea820f39fe11 ✔ 1 request 42 ms median ⚠ 2 warnings ⠋ installing @nuxt/scripts... · 42 ms ⠋ installing with npm · 42 ms - @vue/devtools-core ← ./virtual:nuxt:.nuxt%2Fruntime.vue-devtools-client.CN4wuBpFwm.js BUILDING ✔ dependencies installed · GET /scripts · 200 · 42 ms BUILDING ✔ installed @nuxt/scripts · GET /scripts · 200 · 42 ms READY watching for changes @@ -32,18 +26,11 @@ styles: a057ea820f39fe11 STARTING preparing your app STARTING setting up modules STARTING starting Nuxt... - vite: { - } o open · i info · l logs · n network · p routes · ? help · q quit r restart · o open · i info · l logs · n network · p routes · ? help · q quit ⣠⣦⣠⡀ Nuxt x.y.z ⣠⣦⣠⡀ Nuxt x.y.z ready in 42 ms -Learn more: https://vite.dev/guide/dep-pre-bundling.html -Pre-bundle them in your nuxt.config.ts to avoid page reloads: Yes -export default defineNuxtConfig({ -}) -ℹ Vite discovered new dependencies at runtime: ● Yes / ○ No ✔ Do you want to install @nuxt/scripts package? ❯ Do you want to install @nuxt/scripts package? diff --git a/capture/output/nuxt-dev-plain-restart.svg b/capture/output/nuxt-dev-plain-restart.svg index 6a74bb6a0..194861aee 100644 --- a/capture/output/nuxt-dev-plain-restart.svg +++ b/capture/output/nuxt-dev-plain-restart.svg @@ -16,28 +16,29 @@ svg{--bg:#ffffff;--fg:#24292f;--chrome:#f6f8fa;--dot:#d0d7de} nuxt dev (plain output, restart on config change) - -⠙ Starting Nuxt... 0.0ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose⠸ Setting up modules 0.0ms · 147ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠴ Preparing app 0.0ms · 297ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠦ Preparing app 181ms · 478ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠏ Generating types 7.0ms · 650ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠋ Generating types 98ms · 741ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠹ Bundling app 2.0ms · 908ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms⠴ Building server 12ms · 1.10s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms⠦ Building server 92ms · 1.18s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms⠧ Building server 173ms · 1.26s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms⠇ Building server 276ms · 1.36s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms⠋ Building server 437ms · 1.52s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms⠙ Building server 517ms · 1.60s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms⠹ Building server 601ms · 1.69s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms⠼ Building server 761ms · 1.85s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms✔ Nuxt Nitro server built in 1021ms nitro│◆ Ready in 2.21s →http://localhost:3000/│config 147ms · modules 150ms · app 346ms · types 263ms · bundle 185ms · server 1.12spressh + enterto see available shortcuts -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms✔ Nuxt Nitro server built in 1021ms nitro│◆ Ready in 2.21s →http://localhost:3000/│config 147ms · modules 150ms · app 346ms · types 263ms · bundle 185ms · server 1.12spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updated -➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms✔ Nuxt Nitro server built in 1021ms nitro│◆ Ready in 2.21s →http://localhost:3000/│config 147ms · modules 150ms · app 346ms · types 263ms · bundle 185ms · server 1.12spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updatedℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 21ms✔ Vite server built in 24ms -➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms✔ Nuxt Nitro server built in 1021ms nitro│◆ Ready in 2.21s →http://localhost:3000/│config 147ms · modules 150ms · app 346ms · types 263ms · bundle 185ms · server 1.12spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updatedℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 21ms✔ Vite server built in 24ms✔ Nuxt Nitro server built in 755ms nitro -⠸ Bundling app 117ms · 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 42ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 20ms✔ Nuxt Nitro server built in 1021ms nitro│◆ Ready in 2.21s →http://localhost:3000/│config 147ms · modules 150ms · app 346ms · types 263ms · bundle 185ms · server 1.12spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updatedℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 21ms✔ Vite server built in 24ms✔ Nuxt Nitro server built in 755ms nitroℹ nuxt.config.ts changed. Reloading Nuxt...devtools updated ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2) -│◆ Ready in 2.21s →http://localhost:3000/│config 147ms · modules 150ms · app 346ms · types 263ms · bundle 185ms · server 1.12spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updatedℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 21ms✔ Vite server built in 24ms✔ Nuxt Nitro server built in 755ms nitroℹ nuxt.config.ts changed. Reloading Nuxt...devtools updated ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2) WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 18ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 13ms -◆ Ready in 2.21s →http://localhost:3000/│config 147ms · modules 150ms · app 346ms · types 263ms · bundle 185ms · server 1.12spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updatedℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 21ms✔ Vite server built in 24ms✔ Nuxt Nitro server built in 755ms nitroℹ nuxt.config.ts changed. Reloading Nuxt...devtools updated ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2) WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 18ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 13ms✔ Nuxt Nitro server built in 665ms nitro + +⠙ Starting Nuxt... 0.0ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose⠸ Setting up modules 0.0ms · total 154ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠴ Preparing app 0.0ms · total 299ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠦ Preparing app 180ms · total 479ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠏ Generating types 5.0ms · total 652ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠋ Generating types 95ms · total 742ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠹ Bundling app 3.0ms · total 915ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms⠼ Building server 0.0ms · total 1.07s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms⠴ Building server 52ms · total 1.13s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms⠧ Building server 212ms · total 1.29s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms⠇ Building server 297ms · total 1.37s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms⠋ Building server 466ms · total 1.54s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms⠙ Building server 546ms · total 1.62s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms⠹ Building server 627ms · total 1.70s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms⠸ Building server 708ms · total 1.78s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms⠼ Building server 788ms · total 1.86s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms✔ Nuxt Nitro server built in 1050ms nitro│◆ Ready in 2.21s →http://localhost:3000/│config 154ms · modules 145ms · app 348ms · types 265ms · bundle 167ms · server 1.13spressh + enterto see available shortcuts +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms✔ Nuxt Nitro server built in 1050ms nitro│◆ Ready in 2.21s →http://localhost:3000/│config 154ms · modules 145ms · app 348ms · types 265ms · bundle 167ms · server 1.13spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updated +➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms✔ Nuxt Nitro server built in 1050ms nitro│◆ Ready in 2.21s →http://localhost:3000/│config 154ms · modules 145ms · app 348ms · types 265ms · bundle 167ms · server 1.13spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updatedℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 20ms✔ Vite server built in 24ms +➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms✔ Nuxt Nitro server built in 1050ms nitro│◆ Ready in 2.21s →http://localhost:3000/│config 154ms · modules 145ms · app 348ms · types 265ms · bundle 167ms · server 1.13spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updatedℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 20ms✔ Vite server built in 24ms✔ Nuxt Nitro server built in 771ms nitro +⠸ Bundling app 116ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 12ms✔ Nuxt Nitro server built in 1050ms nitro│◆ Ready in 2.21s →http://localhost:3000/│config 154ms · modules 145ms · app 348ms · types 265ms · bundle 167ms · server 1.13spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updatedℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 20ms✔ Vite server built in 24ms✔ Nuxt Nitro server built in 771ms nitroℹ nuxt.config.ts changed. Reloading Nuxt...devtools updated ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3) +│◆ Ready in 2.21s →http://localhost:3000/│config 154ms · modules 145ms · app 348ms · types 265ms · bundle 167ms · server 1.13spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updatedℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 20ms✔ Vite server built in 24ms✔ Nuxt Nitro server built in 771ms nitroℹ nuxt.config.ts changed. Reloading Nuxt...devtools updated ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3) WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 18ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 14ms +◆ Ready in 2.21s →http://localhost:3000/│config 154ms · modules 145ms · app 348ms · types 265ms · bundle 167ms · server 1.13spressh + enterto see available shortcutsℹ nuxt.config.ts changed. Reloading Nuxt...devtools updatedℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 20ms✔ Vite server built in 24ms✔ Nuxt Nitro server built in 771ms nitroℹ nuxt.config.ts changed. Reloading Nuxt...devtools updated ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3) WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 18ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 14ms✔ Nuxt Nitro server built in 681ms nitro diff --git a/capture/output/nuxt-dev-plain-static.svg b/capture/output/nuxt-dev-plain-static.svg index 2a3a5a256..eca73ae41 100644 --- a/capture/output/nuxt-dev-plain-static.svg +++ b/capture/output/nuxt-dev-plain-static.svg @@ -16,6 +16,6 @@ svg{--bg:#ffffff;--fg:#24292f;--chrome:#f6f8fa;--dot:#d0d7de} nuxt dev (plain output, ready) -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 111ms · 1.04s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 44ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 13ms✔ Nuxt Nitro server built in 1075ms nitro│◆ Ready in 2.25s →http://localhost:3000/│config 155ms · modules 156ms · app 346ms · types 274ms · bundle 165ms · server 1.16spressh + enterto see available shortcuts +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 114ms · total 1.02s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite client built in 43ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 13ms✔ Nuxt Nitro server built in 1041ms nitro│◆ Ready in 2.20s →http://localhost:3000/│config 153ms · modules 144ms · app 353ms · types 264ms · bundle 167ms · server 1.12spressh + enterto see available shortcuts diff --git a/capture/output/nuxt-dev-plain.svg b/capture/output/nuxt-dev-plain.svg index 1c08628c3..b12a45553 100644 --- a/capture/output/nuxt-dev-plain.svg +++ b/capture/output/nuxt-dev-plain.svg @@ -16,26 +16,26 @@ svg{--bg:#ffffff;--fg:#24292f;--chrome:#f6f8fa;--dot:#d0d7de} nuxt dev (plain output) - -⠙ Starting Nuxt... 0.0ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose⠸ Setting up modules 0.0ms · 156ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠴ Preparing app 0.0ms · 315ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠦ Preparing app 180ms · 495ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠏ Generating types 5.0ms · 667ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠋ Generating types 108ms · 770ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠹ Bundling app 2.0ms · 937ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠴ Building server 0.0ms · 1.19s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠦ Building server 30ms · 1.22s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠧ Building server 112ms · 1.30s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠇ Building server 197ms · 1.39s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠏ Building server 279ms · 1.47s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠋ Building server 371ms · 1.56s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠙ Building server 456ms · 1.65s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠹ Building server 536ms · 1.73s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠸ Building server 617ms · 1.81s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠼ Building server 700ms · 1.89s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms⠦ Building server 863ms · 2.06s -│●Nuxt 4.6.1 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.43)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.2)⠸ Bundling app 120ms · 1.05s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 52ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 24ms✔ Nuxt Nitro server built in 1085ms nitro│◆ Ready in 2.43s →http://localhost:3000/│config 156ms · modules 159ms · app 347ms · types 273ms · bundle 262ms · server 1.24spressh + enterto see available shortcuts + +⠙ Starting Nuxt... 1.0ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose⠸ Setting up modules 0.0ms · total 153ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠴ Preparing app 0.0ms · total 297ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠦ Preparing app 180ms · total 477ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠇ Generating types 0.0ms · total 660ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠏ Generating types 4.0ms · total 664ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠋ Generating types 98ms · total 758ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠹ Bundling app 3.0ms · total 924ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms⠴ Building server 0.0ms · total 1.13s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms⠦ Building server 72ms · total 1.21s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms⠧ Building server 151ms · total 1.29s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms⠇ Building server 232ms · total 1.37s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms⠏ Building server 342ms · total 1.48s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms⠋ Building server 422ms · total 1.56s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms⠙ Building server 519ms · total 1.65s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms⠹ Building server 615ms · total 1.75s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms⠼ Building server 800ms · total 1.93s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms⠴ Building server 880ms · total 2.01s +│●Nuxt 4.6.2 (with Nitro 2.13.4, Vite 8.3.4 and Vue 3.5.44)➜Local: http://localhost:3000/➜Network: use --host to expose ➜ DevTools: press Shift + Alt + D in the browser (v3.4.3)⠸ Bundling app 117ms · total 1.03s WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in aℹ Re-optimizing dependencies because vite config has changed✔ Vite client built in 53ms WARN Plugin "nuxt:devtools:config-retriever" defines Vite-specific hooks (configResolved) in a✔ Vite server built in 25ms✔ Nuxt Nitro server built in 1052ms nitro│◆ Ready in 2.37s →http://localhost:3000/│config 153ms · modules 144ms · app 363ms · types 261ms · bundle 218ms · server 1.23spressh + enterto see available shortcuts diff --git a/packages/nuxt-cli/src/commands/build.ts b/packages/nuxt-cli/src/commands/build.ts index 55b95a2fc..797c251a2 100644 --- a/packages/nuxt-cli/src/commands/build.ts +++ b/packages/nuxt-cli/src/commands/build.ts @@ -16,9 +16,10 @@ import { loadKit } from '../utils/kit' import { acquireLock, acquireOutputLock, formatLockError } from '../utils/lockfile' import { intro, logger, outro } from '../utils/logger' import { resolveRootDir } from '../utils/paths' -import { createPhaseReporter, formatPhaseBreakdown } from '../utils/phase-reporter' +import { createPhaseReporter, formatPhaseBreakdown, formatPhaseTable } from '../utils/phase-reporter' import { startCpuProfile, stopCpuProfile } from '../utils/profile' import { resolveServerBuild } from '../utils/server-build' +import { quietServerOutput } from '../utils/server-output' import { dotEnvArgs, envNameArgs, extendsArgs, logLevelArgs, profileArgs, rootDirArgs, targetArgs } from './_shared' /** How often a phase repeats itself where there is no animated line. */ @@ -106,6 +107,10 @@ export default defineCommand({ }) progress.attachNuxt(nuxt) + const serverOutput = quietServerOutput(nuxt, { + command: ctx.args.prerender ? 'generate' : 'build', + onEnvironment: environment => progress.enterEnvironment(environment), + }) showBanner(nuxt) await nuxt.ready() @@ -144,22 +149,31 @@ export default defineCommand({ stopReporting() progress.finish() - const breakdown = formatPhaseBreakdown(progress.timings) - if (breakdown) { - logger.message(styleText('dim', breakdown)) + const serverSummary = serverOutput.summary(progress.timings) + if (serverSummary) { + logger.success(serverSummary) } - if (ctx.args.prerender) { - if (!nuxt.options.ssr) { - logger.warn(`HTML content not prerendered because ${styleText('cyan', 'ssr: false')} was set.`) - logger.info(`You can read more in ${styleText('cyan', 'https://nuxt.com/docs/getting-started/deployment#static-hosting')}.`) - } - const dir = serverBuild.publicDir - const publicDir = dir ? relative(process.cwd(), dir) : '.output/public' - outro(`✨ You can now deploy ${styleText('cyan', publicDir)} to any static hosting! ${styleText('gray', `(${formatDuration(Date.now() - start)})`)}`) + if (ctx.args.prerender && !nuxt.options.ssr) { + logger.warn(`HTML content not prerendered because ${styleText('cyan', 'ssr: false')} was set.`) + logger.info(`You can read more in ${styleText('cyan', 'https://nuxt.com/docs/getting-started/deployment#static-hosting')}.`) + } + + // Where the time went sits right under the total it adds up to: one line + // by default, a row per phase with a bar for its share when verbose. + const verbose = nuxt.options.logLevel === 'verbose' + const breakdown = verbose ? formatPhaseTable(progress.timings) : formatPhaseBreakdown(progress.timings) + const total = `Build complete in ${styleText('cyan', formatDuration(Date.now() - start))}` + const complete = breakdown ? `${total}\n${verbose ? breakdown : styleText('dim', breakdown)}` : total + const next = ctx.args.prerender + ? serverOutput.staticCommands(serverBuild.publicDir ? relative(process.cwd(), serverBuild.publicDir) : '.output/public') + : serverOutput.commands() + if (next.length) { + logger.success(complete) + outro(next.join('\n')) } else { - outro(`✨ Build complete in ${styleText('cyan', formatDuration(Date.now() - start))}!`) + outro(complete) } } finally { diff --git a/packages/nuxt-cli/src/utils/build-progress.ts b/packages/nuxt-cli/src/utils/build-progress.ts index 09c9244bb..8ada50b88 100644 --- a/packages/nuxt-cli/src/utils/build-progress.ts +++ b/packages/nuxt-cli/src/utils/build-progress.ts @@ -12,43 +12,44 @@ const BUILD_PHASES: readonly Phase[] = [ { id: 'modules', message: 'Setting up modules' }, { id: 'app', message: 'Preparing app' }, { id: 'types', message: 'Generating types' }, - { id: 'client', message: 'Bundling client' }, - { id: 'server', message: 'Bundling server' }, - { id: 'nitro', message: 'Building Nitro server' }, + { id: 'bundle (client)', message: 'Bundling client' }, + { id: 'bundle (server)', message: 'Bundling server' }, + { id: 'prerender', message: 'Prerendering routes' }, + { id: 'bundle (nitro)', message: 'Bundling nitro' }, ] const HOOK_PHASES: Record = { 'modules:before': 'modules', 'builder:generateApp': 'app', 'prepare:types': 'types', - 'build:before': 'client', - 'nitro:build:before': 'nitro', + 'build:before': 'bundle (client)', } /** Nitro builds on its own hooks, which Nuxt's never see. */ const NITRO_INIT_HOOK = 'nitro:init' - -/** - * Nitro's own hooks, relabelled. Without these the Nitro phase says nothing - * between the bundle starting and the output being written, which on a large - * project is the longest silence of the build. - */ -const NITRO_MESSAGES: Record = { - 'rollup:before': 'Bundling Nitro server', - 'prerender:routes': 'Prerendering routes', -} +const NITRO_BUILD_HOOK = 'nitro:build:before' const PRERENDER_HOOK = 'prerender:generate' +const PRERENDERED_HOOK = 'prerender:route' + +/** The Vite environment Nitro 3 builds the server in. */ +const NITRO_ENVIRONMENT = 'nitro' interface HookableLike { beforeEach?: (fn: (event: { name: string, args?: unknown[] }) => void) => void } interface NuxtLike { - options?: { experimental?: { viteEnvironmentApi?: boolean } } + options?: { experimental?: { nitroViteEnvironment?: boolean } } hooks?: HookableLike } +/** A Vite environment as it starts building. */ +export interface BuildEnvironment { + name?: string + consumer?: string +} + /** * Tracks how far a production build has got, so the same transient phase line * `nuxt dev` shows can report `nuxt build`, and the completion summary can list @@ -57,12 +58,8 @@ interface NuxtLike { export class BuildProgress extends PhaseTimeline { #message = BUILD_PHASES[0]!.message #finished = false - /** - * With the Vite environment API a single build covers both environments, so - * the client and server configs resolve up front and cannot mark the boundary - * between them. - */ - #splitBundles = true + /** Routes written so far, the one measure of how far prerendering has got. */ + #prerendered = 0 constructor() { super(BUILD_PHASES) @@ -105,49 +102,64 @@ export class BuildProgress extends PhaseTimeline { } } + /** + * Move to the bundle phase of a Vite environment that has started building. + * Vite resolves every config before it bundles anything, and with the + * environment API one config builds them all, so only the build itself knows + * which one it has reached. + */ + enterEnvironment({ name, consumer }: BuildEnvironment): void { + if (name === NITRO_ENVIRONMENT) { + this.setPhase('bundle (nitro)') + return + } + this.setPhase(consumer === 'server' ? 'bundle (server)' : 'bundle (client)') + } + /** * Derive phases from the hooks Nuxt and Nitro call, so the timeline follows * the project's own build rather than a schedule guessed by the CLI. */ attachNuxt(nuxt: NuxtLike): void { - this.#splitBundles = !nuxt.options?.experimental?.viteEnvironmentApi + let nitroBuilding = false nuxt.hooks?.beforeEach?.(({ name, args }) => { const phase = HOOK_PHASES[name] if (phase) { - this.setPhase(phase, phase === 'client' && !this.#splitBundles ? 'Bundling app' : undefined) - return + this.setPhase(phase) } - if (name === 'vite:configResolved' && this.#splitBundles) { - const ctx = args?.[1] as { isServer?: boolean } | undefined - this.setPhase(ctx?.isServer ? 'server' : 'client') + else if (name === NITRO_BUILD_HOOK) { + nitroBuilding = true } else if (name === 'webpack:compile') { const ctx = args?.[0] as { name?: string } | undefined - this.setPhase(ctx?.name === 'server' ? 'server' : 'client') + this.setPhase(ctx?.name === 'server' ? 'bundle (server)' : 'bundle (client)') } else if (name === NITRO_INIT_HOOK) { - this.#attachNitro((args?.[0] as { hooks?: HookableLike } | undefined)?.hooks) + // Nitro's hooks also run while Nuxt is still bundling the app, and those + // are not what the build is waiting on. + const hooks = (args?.[0] as { hooks?: HookableLike } | undefined)?.hooks + hooks?.beforeEach?.(event => nitroBuilding && this.#onNitroHook(event, !!nuxt.options?.experimental?.nitroViteEnvironment)) } }) } - #attachNitro(hooks: HookableLike | undefined): void { - hooks?.beforeEach?.(({ name, args }) => { - // Nitro's hooks also run while Nuxt is still bundling the app, and those - // are not what the build is waiting on. - if (BUILD_PHASES[this.index]!.id !== 'nitro') { - return - } - const message = NITRO_MESSAGES[name] - if (message) { - this.setMessage(message) - } - else if (name === PRERENDER_HOOK) { - const route = (args?.[0] as { route?: string } | undefined)?.route - if (route) { - this.setMessage(`Prerendering ${route}`) - } + #onNitroHook({ name, args }: { name: string, args?: unknown[] }, viteEnvironment: boolean): void { + if (name === 'prerender:init') { + this.setPhase('prerender') + } + // Nitro 2 bundles with Rollup; Nitro 3 as a Vite environment, reported + // through `enterEnvironment`, and runs its Rollup hooks early. + else if (name === 'rollup:before' && !viteEnvironment) { + this.setPhase('bundle (nitro)') + } + else if (name === PRERENDER_HOOK && BUILD_PHASES[this.index]!.id === 'prerender') { + const route = (args?.[0] as { route?: string } | undefined)?.route + if (route) { + this.setMessage(this.#prerendered ? `Prerendering ${route} (${this.#prerendered} done)` : `Prerendering ${route}`) } - }) + } + else if (name === PRERENDERED_HOOK) { + this.#prerendered++ + } } } diff --git a/packages/nuxt-cli/src/utils/formatting.ts b/packages/nuxt-cli/src/utils/formatting.ts index a6a200fc8..c09ed0f07 100644 --- a/packages/nuxt-cli/src/utils/formatting.ts +++ b/packages/nuxt-cli/src/utils/formatting.ts @@ -132,6 +132,19 @@ export function formatDuration(ms: number): string { : `${minutes}m ${seconds}s` } +const BYTE_UNITS = ['B', 'kB', 'MB', 'GB'] + +/** Format a byte count in decimal units, as Vite and Nitro report sizes (`812 B`, `4.36 kB`, `2.45 MB`). */ +export function formatBytes(bytes: number): string { + let value = Math.max(0, bytes) + let unit = 0 + while (value >= 1000 && unit < BYTE_UNITS.length - 1) { + value /= 1000 + unit++ + } + return unit === 0 ? `${value} B` : `${value.toFixed(2)} ${BYTE_UNITS[unit]}` +} + const AT_MENTION_RE = /\b@([^, ]+)/g const BACKTICK_RE = /`([^`]*)`/g diff --git a/packages/nuxt-cli/src/utils/logger.ts b/packages/nuxt-cli/src/utils/logger.ts index c81cb21eb..52f1b8722 100644 --- a/packages/nuxt-cli/src/utils/logger.ts +++ b/packages/nuxt-cli/src/utils/logger.ts @@ -90,10 +90,14 @@ export function intro(message: string): void { /** {@link intro}, for the line a command finishes on. */ export function outro(message: string): void { if (!process.stdout.isTTY || isCI) { - writeDirect(`${styleText('green', S_SUCCESS)} ${message}\n`) + writeDirect(`${styleText('green', S_SUCCESS)} ${message.replace(/\n/g, '\n ')}\n`) return } - clackOutro(message) + // Clack leaves the lines after the first unindented; line them up with it. + message = message.replace(/\n/g, '\n ') + // Nuxt 4 calls `consola.wrapAll()` while building, which trims each chunk + // written to stdout and would drop the blank line clack ends the outro with. + clackOutro(message, { output: { write: writeDirect } as unknown as NodeJS.WriteStream }) } export const debug = createDebug('nuxi') diff --git a/packages/nuxt-cli/src/utils/phase-reporter.ts b/packages/nuxt-cli/src/utils/phase-reporter.ts index 59583fb7e..2099c9274 100644 --- a/packages/nuxt-cli/src/utils/phase-reporter.ts +++ b/packages/nuxt-cli/src/utils/phase-reporter.ts @@ -37,7 +37,7 @@ function formatElapsed(snapshot: ProgressSnapshot, drift: number): string { const total = snapshot.elapsed + drift const phase = snapshot.phaseElapsed + drift return total - phase >= PHASE_ELAPSED_THRESHOLD - ? `${formatDuration(phase)} \u00B7 ${formatDuration(total)}` + ? `${formatDuration(phase)} \u00B7 total ${formatDuration(total)}` : formatDuration(total) } @@ -72,6 +72,27 @@ export function formatPhaseBreakdown(timings: PhaseTiming[]): string { .join(' · ') } +const PHASE_BAR_WIDTH = 20 + +/** + * One phase per line with a bar for its share of the time all phases took, so + * the slow step stands out at a glance. Phases are listed in the order they ran. + */ +export function formatPhaseTable(timings: PhaseTiming[]): string { + const shown = timings.filter(timing => timing.duration >= 10) + const total = shown.reduce((sum, timing) => sum + timing.duration, 0) + const nameWidth = Math.max(...shown.map(timing => timing.phase.length)) + const durations = shown.map(timing => formatDuration(timing.duration)) + const durationWidth = Math.max(...durations.map(duration => duration.length)) + return shown.map((timing, index) => { + const share = timing.duration / total + const filled = Math.max(1, Math.round(share * PHASE_BAR_WIDTH)) + const bar = styleText('cyan', '█'.repeat(filled)) + styleText('dim', '░'.repeat(PHASE_BAR_WIDTH - filled)) + const percent = `${Math.round(share * 100)}%`.padStart(4) + return `${timing.phase.padEnd(nameWidth)} ${durations[index]!.padStart(durationWidth)} ${bar} ${styleText('dim', percent)}` + }).join('\n') +} + /** * The URL the summary points at, so the address is on screen at the moment the * user is being told they can click it rather than a screenful further up. diff --git a/packages/nuxt-cli/src/utils/server-output.ts b/packages/nuxt-cli/src/utils/server-output.ts new file mode 100644 index 000000000..d898e8fa6 --- /dev/null +++ b/packages/nuxt-cli/src/utils/server-output.ts @@ -0,0 +1,319 @@ +import type { Nuxt } from '@nuxt/schema' +import type { Nitro, PrerenderRoute } from 'nitropack' +import type { BuildEnvironment } from './build-progress' +import type { PhaseTiming } from './progress-snapshot' + +import { readdir, stat } from 'node:fs/promises' +import process from 'node:process' +import { styleText } from 'node:util' + +import { join, relative } from 'pathe' +import { isCI } from 'std-env' + +import { formatBytes, formatDuration, stripAnsi } from './formatting' +import { logger } from './logger' + +/** Nitro's `warn` level: warnings and errors still print, progress and file trees do not. */ +const NITRO_QUIET_LOG_LEVEL = 1 + +/** How many prerendered routes a local build lists before pointing at verbose output. */ +const PRERENDER_ROUTE_LIMIT = 20 + +const VITE_PLUGIN_NAME = 'nuxi:server-output' + +/** Vite 8's build reporter, created once per environment. */ +const VITE_REPORTER_PLUGIN = 'native:reporter' + +/** The line Vite opens each environment's build with, e.g. `vite v8.3.5 building ssr environment for production...`. */ +const ENVIRONMENT_BUILD_RE = /building (\S+) environment for/ + +/** Source maps, which `@nuxt/vite-server` writes as `*.map.json`. */ +const SOURCE_MAP_RE = /\.map(?:\.json)?$/ + +export interface ServerOutputReport { + /** The summary of the server build, from the build's phase timings, or nothing for a static-only build. */ + summary: (timings: PhaseTiming[]) => string | undefined + /** How to preview and deploy what was built: no preview when no server was written. */ + commands: () => string[] + /** What to do with a prerendered build: where it can go, or the provider's own deploy command. */ + staticCommands: (publicDir: string) => string[] +} + +interface ServerOutputOptions { + /** The command to suggest for the full route list, such as `build` or `generate`. */ + command?: string + /** Called as each Vite environment starts building. */ + onEnvironment?: (environment: BuildEnvironment) => void +} + +interface ViteLogger { + info: (message: string, options?: unknown) => void +} + +interface ResolvedViteConfig { + logger: ViteLogger + environments?: Record + plugins: Array<{ name?: string, applyToEnvironment?: (environment: { config: { consumer?: string } }) => unknown }> +} + +interface ViteBuildContext { + /** Absent before Vite 6, where each environment has a config of its own. */ + environment?: { name: string, config: { consumer?: string } } +} + +/** Nuxt fields read optimistically: the server build descriptor only exists in recent Nuxt. */ +interface MaybeServerBuild { + serverBuild?: { name: string, output: { dir: () => string } } +} + +/** + * Take over what the server build prints during `nuxt build`, leaving warnings + * and errors in place, and report it as a single line with its time and size + * once it is written. + * + * Nitro 2 builds the server with its own bundler; Nitro 3 and `@nuxt/vite-server` + * build it as a Vite environment, alongside the app. Either way the CLI keeps + * Vite's file lists for the client only. + * + * Nothing changes at `--logLevel=verbose`, or when the project sets a log + * level for Nitro or Vite itself. + */ +export function quietServerOutput(nuxt: Nuxt, options: ServerOutputOptions = {}): ServerOutputReport { + const quiet = nuxt.options.logLevel !== 'verbose' + let usesNitro = false + let size: number | undefined + let prerendered = 0 + const routes: PrerenderRoute[] = [] + let deploy: string | undefined + let isStatic = false + let preset: string | undefined + let outputDir: string | undefined + + const measure = async (dir: string | undefined) => { + size = dir ? await directorySize(dir).catch(() => undefined) : undefined + } + + // Whether the CLI took Nitro's output over, and so owes what it hid. + let nitroQuieted = false + if (quiet) { + nuxt.hook('nitro:config', (config) => { + if (nuxt.options.nitro?.logLevel === undefined && Number(config.logLevel ?? 3) > NITRO_QUIET_LOG_LEVEL) { + config.logLevel = NITRO_QUIET_LOG_LEVEL + nitroQuieted = true + } + }) + } + + const vite = nuxt.options.vite as { logLevel?: string, $server?: { logLevel?: string } } | undefined + const quietVite = quiet && !vite?.logLevel && !vite?.$server?.logLevel + nuxt.hook('vite:extendConfig', (config, { isServer }) => { + // A config of its own builds nothing but the server, so its log level can + // drop too, which also silences the progress lines Vite's native reporter + // writes straight to the terminal. With the environment API one config + // builds every environment, and is read at hook time because a server + // builder may switch the API on during setup. + if (quietVite && isServer && !nuxt.options.experimental?.viteEnvironmentApi && config.logLevel !== 'silent') { + (config as { logLevel?: string }).logLevel = 'warn' + } + // The environment API extends one shared config once per environment. + const plugins = config.plugins as unknown[] | undefined + if (plugins && !plugins.some(plugin => (plugin as { name?: string } | null)?.name === VITE_PLUGIN_NAME)) { + plugins.push(createVitePlugin()) + } + }) + + function createVitePlugin() { + const servers = new Set() + let muted = false + let ssr = false + return { + name: VITE_PLUGIN_NAME, + apply: 'build' as const, + configResolved(config: ResolvedViteConfig & { build?: { ssr?: unknown } }) { + ssr = !!config.build?.ssr + for (const [name, environment] of Object.entries(config.environments ?? {})) { + if (environment.consumer === 'server') { + servers.add(name) + } + } + if (!quietVite) { + return + } + // Vite's reporter is native and writes its progress lines (`N modules + // transformed.`, `computing gzip size...`) straight to the terminal, past + // the logger, so it is left out of server environments altogether. + const reporter = config.plugins.find(plugin => plugin.name === VITE_REPORTER_PLUGIN) + const applyToEnvironment = reporter?.applyToEnvironment + if (reporter && applyToEnvironment) { + reporter.applyToEnvironment = environment => environment.config.consumer === 'server' ? false : applyToEnvironment(environment) + } + // Vite reports each environment through the one logger, at a single log + // level. Muting its info messages while a server environment builds keeps + // the client's file list and every warning. + const info = config.logger.info.bind(config.logger) + config.logger.info = (message, options) => { + const environment = typeof message === 'string' ? stripAnsi(message).match(ENVIRONMENT_BUILD_RE)?.[1] : undefined + if (environment) { + muted = servers.has(environment) + } + if (!muted) { + info(message, options) + } + } + }, + buildStart(this: ViteBuildContext) { + const consumer = this.environment?.config.consumer ?? (ssr ? 'server' : 'client') + muted = consumer === 'server' && quietVite + options.onEnvironment?.({ name: this.environment?.name, consumer }) + }, + } + } + + // Without Nitro the Vite server build is the whole server output. + nuxt.hook('build:done', async () => { + if (!usesNitro) { + const dir = (nuxt as unknown as MaybeServerBuild).serverBuild?.output.dir() + await measure(dir ? join(dir, 'server') : undefined) + } + }) + + nuxt.hook('nitro:init', (nitro) => { + usesNitro = true + nitro.hooks.hook('prerender:route', (route) => { + // A skipped route fires the hook without being written. + if (!route.error && !route.skip) { + prerendered++ + } + if (!route.error) { + routes.push(route) + } + }) + nitro.hooks.hook('prerender:done', ({ failedRoutes }) => { + // Nitro lists these at its `log` level, which the quiet build drops. + if (failedRoutes.length && nitroQuieted) { + logger.error(`Failed to prerender ${failedRoutes.length} route${failedRoutes.length === 1 ? '' : 's'}:\n${ + failedRoutes.map(formatFailedRoute).join('\n')}`) + } + }) + nitro.hooks.hook('compiled', async () => { + isStatic = !!nitro.options.static + preset = nitro.options.preset + outputDir = nitro.options.output.dir + deploy = nitro.options.commands?.deploy ? resolveDeployCommand(nitro) : undefined + await measure(nitro.options.output.serverDir) + }) + }) + + return { + summary(timings) { + const lines: string[] = [] + const prerender = timings.find(timing => timing.phase === 'prerender') + if (prerender && prerendered) { + lines.push(`Prerendered ${prerendered} route${prerendered === 1 ? '' : 's'} in ${formatDuration(prerender.duration)}`) + // Nitro lists routes itself unless the CLI quieted it. + if (nitroQuieted) { + // Joined rather than spread: a CI build can list more routes than a call takes arguments. + lines.push(formatPrerenderedRoutes(routes, nuxtCommand(nuxt, options.command ?? 'build')).join('\n')) + } + } + // Without Nitro, the Vite server bundle is the server output. + const server = timings.find(timing => timing.phase === (usesNitro ? 'bundle (nitro)' : 'bundle (server)')) + // No size means nothing was written, as in a static build. + if (!isStatic && server && size !== undefined) { + const builder = usesNitro ? 'nitro' : (nuxt as unknown as MaybeServerBuild).serverBuild?.name || 'server' + lines.push(`Server (${builder}) built in ${formatDuration(server.duration)}${styleText('dim', ` \u00B7 ${formatBytes(size)}`)}`) + } + return lines.length ? lines.join('\n') : undefined + }, + commands() { + const commands: string[] = [] + // A static preset writes no server to preview, but may still name a deploy command. + if (!isStatic && size !== undefined) { + commands.push(`You can preview this build using ${styleText('cyan', nuxtCommand(nuxt, 'preview'))}`) + } + if (deploy) { + commands.push(`You can deploy this build using ${styleText('cyan', deploy)}`) + } + return commands + }, + staticCommands(publicDir) { + // Only the generic preset writes plain files that any static host serves. + if (!preset || preset === 'static') { + return [`You can now deploy ${styleText('cyan', publicDir)} to any static hosting`] + } + // A provider preset lays its output out for that provider. + if (deploy) { + return [`You can deploy this build using ${styleText('cyan', deploy)}`] + } + const dir = outputDir ? relative(process.cwd(), outputDir) || '.' : publicDir + return [`You can now deploy ${styleText('cyan', dir)} to ${styleText('cyan', preset)}`] + }, + } +} + +/** + * The routes a build wrote. CI logs are read after the fact to check what was + * deployed, so they list every route, skipped ones too; a terminal lists the + * first few and says how to see the rest. + */ +/** `npx nuxt `, naming the project when it is not the current directory. */ +function nuxtCommand(nuxt: Nuxt, command: string): string { + const dir = relative(process.cwd(), nuxt.options.rootDir || process.cwd()) + return `npx nuxt ${command}${dir ? ` ${/\s/.test(dir) ? JSON.stringify(dir) : dir}` : ''}` +} + +function formatPrerenderedRoutes(routes: PrerenderRoute[], command: string): string[] { + const listed = isCI ? routes : routes.filter(route => !route.skip) + const shown = isCI ? listed : listed.slice(0, PRERENDER_ROUTE_LIMIT) + const width = Math.min(shown.reduce((max, route) => Math.max(max, route.route.length), 0), 60) + const times = shown.map(route => route.skip ? 'skipped' : formatRouteTime(route.generateTimeMS)) + const timeWidth = times.reduce((max, time) => Math.max(max, time.length), 0) + const lines = shown.map((route, index) => `${route.route.padEnd(width)} ${styleText('dim', times[index]!.padStart(timeWidth))}`.trimEnd()) + const hidden = listed.length - shown.length + if (hidden) { + lines.push(styleText('dim', `\u2026 and ${hidden} more. Run ${styleText('cyan', `${command} --logLevel=verbose`)} to see all prerendered routes.`)) + } + return lines +} + +/** Whole milliseconds, as Nitro prints them, until a route takes seconds. */ +function formatRouteTime(ms: number | undefined): string { + if (ms === undefined) { + return '' + } + return ms < 1000 ? `${Math.round(ms)}ms` : formatDuration(ms) +} + +function formatFailedRoute(route: PrerenderRoute): string { + // Nitro 2 sets `statusCode` and `statusMessage`; Nitro 3 `status` and `statusText`. + const error = route.error as (PrerenderRoute['error'] & { status?: number, statusText?: string }) | undefined + const status = [error?.statusCode ?? error?.status, error?.statusMessage ?? error?.statusText].filter(Boolean).join(' ') + return `${route.route}${status ? styleText('dim', ` (${status})`) : ''}` +} + +/** + * The deploy command Nitro would print. Nitro 2 fills `{{ output.dir }}` + * placeholders relative to the working directory; Nitro 3 names a command of + * its own. + */ +function resolveDeployCommand(nitro: Nitro): string { + const options = nitro.options as Nitro['options'] & { builder?: string, framework?: { deployCommand?: string } } + if (options.builder) { + return options.framework?.deployCommand || 'npx nitro deploy --prebuilt' + } + return options.commands.deploy!.replace(/\{\{ ?([\w.]+) ?\}\}/g, (match, key: string) => { + const value = key.split('.').reduce((object, part) => object?.[part], options) + return typeof value === 'string' ? relative(process.cwd(), value) || '.' : match + }) +} + +/** Bytes on disk under `dir`, leaving out source maps as Nitro's own total does. */ +async function directorySize(dir: string): Promise { + let total = 0 + for (const entry of await readdir(dir, { withFileTypes: true, recursive: true })) { + if (entry.isFile() && !SOURCE_MAP_RE.test(entry.name)) { + total += (await stat(join(entry.parentPath, entry.name))).size + } + } + return total +} diff --git a/packages/nuxt-cli/test/unit/build-progress.spec.ts b/packages/nuxt-cli/test/unit/build-progress.spec.ts index 8aa216973..ce6b1ef66 100644 --- a/packages/nuxt-cli/test/unit/build-progress.spec.ts +++ b/packages/nuxt-cli/test/unit/build-progress.spec.ts @@ -6,12 +6,12 @@ import { BuildProgress } from '../../src/utils/build-progress' type HookHandler = (event: { name: string, args?: unknown[] }) => void -function nuxtStub(options: { viteEnvironmentApi?: boolean } = {}) { +function nuxtStub(options: { nitroViteEnvironment?: boolean } = {}) { const handlers: HookHandler[] = [] const nitroHandlers: HookHandler[] = [] return { nuxt: { - options: { experimental: { viteEnvironmentApi: options.viteEnvironmentApi } }, + options: { experimental: { nitroViteEnvironment: options.nitroViteEnvironment } }, hooks: { beforeEach: (fn: HookHandler) => void handlers.push(fn) }, }, call(name: string, ...args: unknown[]) { @@ -39,15 +39,18 @@ describe('build progress', () => { const progress = new BuildProgress() const stub = nuxtStub() progress.attachNuxt(stub.nuxt) + stub.call('nitro:init', stub.nitro) const seen = messages(progress) stub.call('modules:before') stub.call('builder:generateApp') stub.call('prepare:types') stub.call('build:before') - stub.call('vite:configResolved', {}, { isClient: true, isServer: false }) - stub.call('vite:configResolved', {}, { isClient: false, isServer: true }) + progress.enterEnvironment({ name: 'client', consumer: 'client' }) + progress.enterEnvironment({ name: 'ssr', consumer: 'server' }) stub.call('nitro:build:before', {}) + stub.callNitro('prerender:init') + stub.callNitro('rollup:before') progress.finish() expect(seen).toEqual([ @@ -57,37 +60,61 @@ describe('build progress', () => { 'Generating types', 'Bundling client', 'Bundling server', - 'Building Nitro server', + 'Prerendering routes', + 'Bundling nitro', ]) - expect(progress.timings.map(timing => timing.phase)).toEqual(['config', 'modules', 'app', 'types', 'client', 'server', 'nitro']) + expect(progress.timings.map(timing => timing.phase)).toEqual(['config', 'modules', 'app', 'types', 'bundle (client)', 'bundle (server)', 'prerender', 'bundle (nitro)']) }) - it('should not split the bundle phase when a single build covers both environments', () => { + it('should ignore Nitro\'s hooks until Nuxt starts the Nitro build', () => { const progress = new BuildProgress() - const stub = nuxtStub({ viteEnvironmentApi: true }) + const stub = nuxtStub() progress.attachNuxt(stub.nuxt) + stub.call('nitro:init', stub.nitro) const seen = messages(progress) + // Nitro runs its Rollup hooks while Nuxt is still bundling the app. stub.call('build:before') - stub.call('vite:configResolved', {}, { isClient: true, isServer: false }) - stub.call('vite:configResolved', {}, { isClient: false, isServer: true }) + stub.callNitro('rollup:before') + progress.enterEnvironment({ name: 'ssr', consumer: 'server' }) - expect(seen).toEqual(['Loading Nuxt config', 'Bundling app']) + expect(seen).toEqual(['Loading Nuxt config', 'Bundling client', 'Bundling server']) }) - it('should name what the Nitro phase is doing', () => { + it('should take the Nitro phase from its Vite environment when Nitro builds with Vite', () => { const progress = new BuildProgress() - const stub = nuxtStub() + const stub = nuxtStub({ nitroViteEnvironment: true }) progress.attachNuxt(stub.nuxt) stub.call('nitro:init', stub.nitro) const seen = messages(progress) - stub.callNitro('rollup:before') + // Nitro 3 starts its build before Vite bundles the app. stub.call('nitro:build:before', {}) stub.callNitro('rollup:before') + progress.enterEnvironment({ name: 'client', consumer: 'client' }) + progress.enterEnvironment({ name: 'ssr', consumer: 'server' }) + stub.callNitro('prerender:init') + progress.enterEnvironment({ name: 'nitro', consumer: 'server' }) + progress.finish() + + expect(seen).toEqual(['Loading Nuxt config', 'Bundling client', 'Bundling server', 'Prerendering routes', 'Bundling nitro']) + expect(progress.timings.map(timing => timing.phase)).toEqual(['config', 'bundle (client)', 'bundle (server)', 'prerender', 'bundle (nitro)']) + }) + + it('should count prerendered routes', () => { + const progress = new BuildProgress() + const stub = nuxtStub() + progress.attachNuxt(stub.nuxt) + stub.call('nitro:init', stub.nitro) + const seen = messages(progress) + + stub.call('nitro:build:before', {}) + stub.callNitro('prerender:init') stub.callNitro('prerender:generate', { route: '/about' }) + stub.callNitro('prerender:route', { route: '/about' }) + stub.callNitro('prerender:generate', { route: '/blog' }) - expect(seen).toEqual(['Loading Nuxt config', 'Building Nitro server', 'Bundling Nitro server', 'Prerendering /about']) + expect(seen).toEqual(['Loading Nuxt config', 'Prerendering routes', 'Prerendering /about', 'Prerendering /blog (1 done)']) }) it('should keep phase durations after the build is finished', () => { @@ -98,7 +125,7 @@ describe('build progress', () => { stub.call('modules:before') progress.finish() progress.finish() - stub.call('nitro:build:before', {}) + progress.enterEnvironment({ name: 'client', consumer: 'client' }) expect(progress.timings.map(timing => timing.phase)).toEqual(['config', 'modules']) expect(progress.snapshot.phase).toBe('modules') diff --git a/packages/nuxt-cli/test/unit/commands/build.spec.ts b/packages/nuxt-cli/test/unit/commands/build.spec.ts index 0b5bf8ef0..140f1fdc2 100644 --- a/packages/nuxt-cli/test/unit/commands/build.spec.ts +++ b/packages/nuxt-cli/test/unit/commands/build.spec.ts @@ -37,7 +37,7 @@ vi.mock('../../../src/utils/lockfile', () => ({ formatLockError: mocks.formatLockError, })) vi.mock('../../../src/utils/logger', () => ({ - logger: { error: vi.fn(), info: vi.fn(), warn: vi.fn(), message: vi.fn() }, + logger: { error: vi.fn(), info: vi.fn(), warn: vi.fn(), message: vi.fn(), success: vi.fn() }, intro: vi.fn(), outro: vi.fn(), })) diff --git a/packages/nuxt-cli/test/unit/phase-reporter.spec.ts b/packages/nuxt-cli/test/unit/phase-reporter.spec.ts index 6c28f3c5a..221e1b229 100644 --- a/packages/nuxt-cli/test/unit/phase-reporter.spec.ts +++ b/packages/nuxt-cli/test/unit/phase-reporter.spec.ts @@ -1,6 +1,8 @@ import type { PhaseReporter } from '../../src/utils/phase-reporter' import type { ProgressSnapshot } from '../../src/utils/progress-snapshot' +import { stripVTControlCharacters } from 'node:util' + import { afterEach, describe, expect, it, vi } from 'vitest' import { blankLineBefore, observeOutput, trackOutputSpacing } from '../../src/utils/stdout' @@ -13,7 +15,7 @@ vi.mock('std-env', async importOriginal => ({ process.env.FORCE_COLOR = '3' -const { createPhaseReporter, formatSummary, isAnimationSupported } = await import('../../src/utils/phase-reporter') +const { createPhaseReporter, formatPhaseTable, formatSummary, isAnimationSupported } = await import('../../src/utils/phase-reporter') function snapshot(overrides: Partial = {}): ProgressSnapshot { return { @@ -70,7 +72,7 @@ describe('phase reporter', () => { startup.update(snapshot({ phase: 'types', message: 'Generating types', index: 3, elapsed: 41_000, phaseElapsed: 33_000 })) }) - expect(screen(renderer)).toMatch(/^. Generating types 33\.0s \u00B7 41\.0s$/) + expect(screen(renderer)).toMatch(/^. Generating types 33\.0s \u00B7 total 41\.0s$/) }) it('should redraw only the spinner while the rest of the line is unchanged', () => { @@ -173,7 +175,7 @@ describe('phase reporter', () => { await waitForOutput('Generating server types') }) - expect(screen(renderer)).toContain('Generating server types (33.0s \u00B7 41.0s)') + expect(screen(renderer)).toContain('Generating server types (33.0s \u00B7 total 41.0s)') }) it('should leave foreign output intact', async () => { @@ -381,3 +383,20 @@ describe('phase reporter', () => { delete process.env.NO_COLOR }) }) + +describe('formatPhaseTable', () => { + it('lines phases up with a bar for their share of the phases shown', () => { + const table = formatPhaseTable([ + { phase: 'config', message: '', duration: 1000 }, + { phase: 'types', message: '', duration: 5 }, + { phase: 'bundle (client)', message: '', duration: 2900 }, + { phase: 'prerender', message: '', duration: 100 }, + ]) + // `types` is too quick to list, so it is left out of the total as well. + expect(stripVTControlCharacters(table).split('\n')).toEqual([ + 'config 1.00s █████░░░░░░░░░░░░░░░ 25%', + 'bundle (client) 2.90s ███████████████░░░░░ 73%', + 'prerender 100ms █░░░░░░░░░░░░░░░░░░░ 3%', + ]) + }) +}) diff --git a/packages/nuxt-cli/test/unit/utils/server-output.spec.ts b/packages/nuxt-cli/test/unit/utils/server-output.spec.ts new file mode 100644 index 000000000..a4bc4d161 --- /dev/null +++ b/packages/nuxt-cli/test/unit/utils/server-output.spec.ts @@ -0,0 +1,286 @@ +import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises' +import { tmpdir } from 'node:os' + +import { join } from 'pathe' +import { afterEach, describe, expect, it, vi } from 'vitest' + +import { formatBytes, stripAnsi } from '../../../src/utils/formatting' +import { quietServerOutput } from '../../../src/utils/server-output' + +const mocks = vi.hoisted(() => ({ error: vi.fn(), isCI: false })) +vi.mock('../../../src/utils/logger', () => ({ logger: { error: mocks.error } })) +vi.mock('std-env', async importOriginal => ({ + ...await importOriginal(), + get isCI() { return mocks.isCI }, +})) + +type Handler = (...args: any[]) => unknown + +function createHooks() { + const handlers: Record = {} + return { + hook: (name: string, fn: Handler) => void (handlers[name] ||= []).push(fn), + call: async (name: string, ...args: unknown[]) => { + for (const fn of handlers[name] || []) { + await fn(...args) + } + }, + has: (name: string) => !!handlers[name]?.length, + } +} + +function createNuxt(options: Record = {}) { + const hooks = createHooks() + return { nuxt: { options: { logLevel: 'info', nitro: {}, vite: {}, experimental: {}, ...options }, hook: hooks.hook }, hooks } +} + +let dir: string | undefined +afterEach(async () => { + vi.clearAllMocks() + mocks.isCI = false + if (dir) { + await rm(dir, { recursive: true, force: true }) + } +}) + +/** Run `vite:extendConfig` and resolve the plugin the CLI added, against a logger that records what it lets through. */ +async function resolveVitePlugin(hooks: ReturnType) { + const config = { plugins: [] as any[] } + await hooks.call('vite:extendConfig', config, { isClient: true, isServer: false }) + const plugin = config.plugins[0] + const printed: string[] = [] + const logger = { info: (message: string) => void printed.push(message) } + // Vite's reporter, which Vite builds per environment. + const reporter = { name: 'native:reporter', applyToEnvironment: (_environment: { config: { consumer: string } }) => ({ name: 'builtin:vite-reporter' }) as unknown } + plugin.configResolved({ logger, plugins: [reporter], environments: { client: { consumer: 'client' }, ssr: { consumer: 'server' }, nitro: { consumer: 'server' } } }) + return { plugin, logger, printed, reporter } +} + +describe('quietServerOutput', () => { + it('drops Nitro to warnings only', async () => { + const { nuxt, hooks } = createNuxt() + quietServerOutput(nuxt as any) + + const nitroConfig = { logLevel: 3 } + await hooks.call('nitro:config', nitroConfig) + + expect(nitroConfig.logLevel).toBe(1) + }) + + it('leaves Vite\'s native reporter out of server environments', async () => { + const { nuxt, hooks } = createNuxt() + quietServerOutput(nuxt as any) + const { reporter } = await resolveVitePlugin(hooks) + + expect(reporter.applyToEnvironment({ config: { consumer: 'client' } })).toEqual({ name: 'builtin:vite-reporter' }) + expect(reporter.applyToEnvironment({ config: { consumer: 'server' } })).toBe(false) + }) + + it('keeps Vite\'s output for the client environment only', async () => { + const { nuxt, hooks } = createNuxt() + quietServerOutput(nuxt as any) + const { plugin, logger, printed } = await resolveVitePlugin(hooks) + + // Vite announces each environment before its plugins start. + logger.info('\u001B[36mvite v8.3.5 \u001B[32mbuilding client environment for production...\u001B[39m') + plugin.buildStart.call({ environment: { name: 'client', config: { consumer: 'client' } } }) + logger.info('.output/public/_nuxt/entry.js') + logger.info('vite v8.3.5 building ssr environment for production...') + plugin.buildStart.call({ environment: { name: 'ssr', config: { consumer: 'server' } } }) + logger.info('.nuxt/vite/services/ssr/server.mjs') + logger.info('vite v8.3.5 building nitro environment for production...') + logger.info('.output/server/index.mjs') + + expect(printed.map(line => stripAnsi(line))).toEqual([ + 'vite v8.3.5 building client environment for production...', + '.output/public/_nuxt/entry.js', + ]) + }) + + it('reports each Vite environment as it starts building, before Vite 6 too', async () => { + const { nuxt, hooks } = createNuxt() + const started: unknown[] = [] + quietServerOutput(nuxt as any, { onEnvironment: environment => void started.push(environment) }) + const { plugin } = await resolveVitePlugin(hooks) + plugin.buildStart.call({ environment: { name: 'nitro', config: { consumer: 'server' } } }) + + const legacy = { plugins: [] as any[] } + await hooks.call('vite:extendConfig', legacy, { isClient: false, isServer: true }) + legacy.plugins[0].configResolved({ logger: { info: () => {} }, plugins: [], build: { ssr: true } }) + legacy.plugins[0].buildStart.call({}) + + expect(started).toEqual([{ name: 'nitro', consumer: 'server' }, { name: undefined, consumer: 'server' }]) + }) + + it('leaves log levels alone when verbose or set by the project', async () => { + const verbose = createNuxt({ logLevel: 'verbose' }) + quietServerOutput(verbose.nuxt as any) + const silent = createNuxt({ logLevel: 'silent' }) + quietServerOutput(silent.nuxt as any) + const configured = createNuxt({ nitro: { logLevel: 3 }, vite: { $server: { logLevel: 'info' } } }) + quietServerOutput(configured.nuxt as any) + + const verboseConfig = { logLevel: 3 } + await verbose.hooks.call('nitro:config', verboseConfig) + const silentConfig = { logLevel: 0 } + await silent.hooks.call('nitro:config', silentConfig) + const configuredConfig = { logLevel: 3 } + await configured.hooks.call('nitro:config', configuredConfig) + + expect([verboseConfig.logLevel, silentConfig.logLevel, configuredConfig.logLevel]).toEqual([3, 0, 3]) + for (const { hooks } of [verbose, configured]) { + const { logger, printed } = await resolveVitePlugin(hooks) + logger.info('vite v8.3.5 building ssr environment for production...') + logger.info('.nuxt/vite/services/ssr/server.mjs') + expect(printed).toHaveLength(2) + } + }) + + it('summarises the server build and lists failed prerenders', async () => { + dir = await mkdtemp(join(tmpdir(), 'nuxi-server-output-')) + const serverDir = join(dir, 'server') + await mkdir(join(serverDir, 'chunks'), { recursive: true }) + await writeFile(join(serverDir, 'index.mjs'), 'x'.repeat(1500)) + await writeFile(join(serverDir, 'chunks/app.mjs'), 'x'.repeat(1000)) + await writeFile(join(serverDir, 'chunks/app.mjs.map'), 'x'.repeat(50_000)) + + const { nuxt, hooks } = createNuxt() + const report = quietServerOutput(nuxt as any) + const nitroHooks = createHooks() + const nitro = { + options: { output: { serverDir, dir }, commands: { preview: 'node {{ output.serverDir }}/index.mjs' } }, + hooks: nitroHooks, + } + await hooks.call('nitro:config', { logLevel: 3 }) + await hooks.call('nitro:init', nitro) + await nitroHooks.call('prerender:route', { route: '/', generateTimeMS: 42 }) + await nitroHooks.call('prerender:route', { route: '/feed', skip: true }) + await nitroHooks.call('prerender:route', { route: '/gone', error: { statusCode: 404 } }) + // Nitro 2 and Nitro 3 name the HTTP status differently. + await nitroHooks.call('prerender:done', { failedRoutes: [ + { route: '/gone', error: { statusCode: 404, statusMessage: 'Not Found' } }, + { route: '/broken', error: { status: 500, statusText: 'Server Error' } }, + ] }) + await nitroHooks.call('compiled', nitro) + + const timings = [ + { phase: 'bundle (server)', message: '', duration: 300 }, + { phase: 'prerender', message: '', duration: 1200 }, + { phase: 'bundle (nitro)', message: '', duration: 2500 }, + ] + const lines = stripAnsi(report.summary(timings)!).split('\n') + expect(lines[0]).toBe('Prerendered 1 route in 1.20s') + // Skipped and failed routes stay out of the list. + expect(lines[1]).toBe('/ 42ms') + // Source maps are left out, as Nitro leaves them out of its own total. + expect(lines[2]).toBe('Server (nitro) built in 2.50s · 2.50 kB') + expect(lines).toHaveLength(3) + expect(report.commands().map(stripAnsi)).toEqual(['You can preview this build using npx nuxt preview']) + expect(stripAnsi(mocks.error.mock.calls[0]![0])).toBe('Failed to prerender 2 routes:\n/gone (404 Not Found)\n/broken (500 Server Error)') + }) + + async function prerender(count: number, options: { command?: string } = {}) { + const { nuxt, hooks } = createNuxt() + const report = quietServerOutput(nuxt as any, options) + const nitroHooks = createHooks() + await hooks.call('nitro:config', { logLevel: 3 }) + await hooks.call('nitro:init', { options: { output: { serverDir: '/missing' } }, hooks: nitroHooks }) + for (let index = 0; index < count; index++) { + await nitroHooks.call('prerender:route', { route: `/post-${index}`, generateTimeMS: 5 }) + } + await nitroHooks.call('prerender:route', { route: '/feed', skip: true }) + return stripAnsi(report.summary([{ phase: 'prerender', message: '', duration: 900 }])!).split('\n') + } + + it('lists the first 20 written routes in a terminal and says how to see the rest', async () => { + const lines = await prerender(23, { command: 'generate' }) + expect(lines[0]).toBe('Prerendered 23 routes in 900ms') + expect(lines.slice(1, 3)).toEqual(['/post-0 5ms', '/post-1 5ms']) + expect(lines[20]).toBe('/post-19 5ms') + expect(lines.slice(21)).toEqual(['… and 3 more. Run npx nuxt generate --logLevel=verbose to see all prerendered routes.']) + }) + + it('lists every route in CI, skipped ones too', async () => { + mocks.isCI = true + const lines = await prerender(23) + expect(lines).toHaveLength(25) + expect(lines.at(-2)).toBe('/post-22 5ms') + expect(lines.at(-1)).toBe('/feed skipped') + }) + + it('leaves failed prerenders to Nitro when the project sets its log level', async () => { + const { nuxt, hooks } = createNuxt({ nitro: { logLevel: 3 } }) + quietServerOutput(nuxt as any) + const nitroHooks = createHooks() + await hooks.call('nitro:config', { logLevel: 3 }) + await hooks.call('nitro:init', { options: { output: { serverDir: '/missing' } }, hooks: nitroHooks }) + await nitroHooks.call('prerender:done', { failedRoutes: [{ route: '/gone', error: { statusCode: 404 } }] }) + + expect(mocks.error).not.toHaveBeenCalled() + }) + + it('reports a server built by Vite when Nitro is not the server builder', async () => { + dir = await mkdtemp(join(tmpdir(), 'nuxi-server-output-')) + await mkdir(join(dir, 'server'), { recursive: true }) + await writeFile(join(dir, 'server/index.mjs'), 'x'.repeat(1200)) + await writeFile(join(dir, 'server/index.mjs.map.json'), 'x'.repeat(40_000)) + + // Built from the parent directory, as `nuxt build playground` does. + const { nuxt, hooks } = createNuxt({ rootDir: join(process.cwd(), 'playground') }) + Object.assign(nuxt, { serverBuild: { name: 'vite', output: { dir: () => dir } } }) + const report = quietServerOutput(nuxt as any) + const { plugin } = await resolveVitePlugin(hooks) + plugin.buildStart.call({ environment: { name: 'client', config: { consumer: 'client' } } }) + plugin.buildStart.call({ environment: { name: 'ssr', config: { consumer: 'server' } } }) + await hooks.call('build:done') + + const timings = [{ phase: 'bundle (client)', message: '', duration: 900 }, { phase: 'bundle (server)', message: '', duration: 400 }] + expect(stripAnsi(report.summary(timings)!).split('\n')).toEqual([ + 'Server (vite) built in 400ms · 1.20 kB', + ]) + expect(report.commands().map(stripAnsi)).toEqual(['You can preview this build using npx nuxt preview playground']) + }) + + it('reports nothing about a server for a static build, but keeps its deploy command', async () => { + const { nuxt, hooks } = createNuxt() + const report = quietServerOutput(nuxt as any) + const nitroHooks = createHooks() + const nitro = { options: { static: true, output: { serverDir: '/missing' }, commands: { deploy: 'npx wrangler pages deploy' } }, hooks: nitroHooks } + await hooks.call('nitro:init', nitro) + await nitroHooks.call('compiled', nitro) + + expect(report.summary([{ phase: 'bundle (nitro)', message: '', duration: 100 }])).toBeUndefined() + expect(report.commands().map(stripAnsi)).toEqual(['You can deploy this build using npx wrangler pages deploy']) + }) +}) + +describe('static build outro', () => { + async function staticBuild(options: Record) { + const { nuxt, hooks } = createNuxt() + const report = quietServerOutput(nuxt as any) + const nitroHooks = createHooks() + const nitro = { options: { static: true, output: { serverDir: '/missing', dir: join(process.cwd(), 'dist') }, ...options }, hooks: nitroHooks } + await hooks.call('nitro:init', nitro) + await nitroHooks.call('compiled', nitro) + return report.staticCommands('.output/public').map(stripAnsi) + } + + it('offers any static host only for the generic preset', async () => { + expect(await staticBuild({ preset: 'static' })).toEqual(['You can now deploy .output/public to any static hosting']) + }) + + it('gives a provider preset its own deploy command', async () => { + expect(await staticBuild({ preset: 'vercel-static', commands: { deploy: 'npx vercel deploy --prebuilt' } })) + .toEqual(['You can deploy this build using npx vercel deploy --prebuilt']) + }) + + it('names the provider when its preset has no deploy command', async () => { + expect(await staticBuild({ preset: 'netlify-static' })).toEqual(['You can now deploy dist to netlify-static']) + }) +}) + +describe('formatBytes', () => { + it('uses decimal units like Vite and Nitro', () => { + expect([formatBytes(999), formatBytes(1000), formatBytes(2_454_000)]).toEqual(['999 B', '1.00 kB', '2.45 MB']) + }) +})