Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt, nuxi): improve pages creation and removal dx #8502

Merged
merged 8 commits into from Oct 27, 2022
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Oct 26, 2022

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Fixes some issues when creating and removing pages directory:

  • When pages directory is empty (in all layers), and no explicit options.pages provided, module self-disables
  • When pages is disabled, a placeholder <NuxtPage> with default slot takes in place and warns to create pages/index.vue
  • Nuxi restarts when pages is disabled and there are some files inside pages OR when pages is enabled and there is no files in pages directory on watch events containing pages/** path

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codesandbox
Copy link

codesandbox bot commented Oct 26, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@pi0 pi0 requested review from danielroe and Atinux October 26, 2022 13:17
@netlify
Copy link

netlify bot commented Oct 26, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 67a64fe
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/635aa8b517418f000944d17d

packages/nuxi/src/commands/dev.ts Outdated Show resolved Hide resolved
packages/nuxt/src/pages/module.ts Outdated Show resolved Hide resolved
Copy link
Member

Atinux commented Oct 27, 2022

Beautiful work :)

Is there a chance we can get the logs from the Vue app on SSR and apply the same formatting as we do with consola?
CleanShot 2022-10-27 at 16.03.29@2x.png

Co-authored-by: SΓ©bastien Chopin <seb@nuxtjs.com>
@pi0 pi0 merged commit 1f6b3be into main Oct 27, 2022
@pi0 pi0 deleted the fix/empty-pages branch October 27, 2022 15:50
@pi0 pi0 mentioned this pull request Nov 3, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants