8000 refactor(nuxi,schema): move loading template into schema by danielroe Β· Pull Request #22336 Β· nuxt/nuxt Β· GitHub
[go: up one dir, main page]

Skip to content

refactor(nuxi,schema): move loading template into schema #22336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 26, 2023

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves #14353

❓ 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This change is partly necessitated by #14146. Rather than loading the loading ui template dynamically within nuxi, which has no declared peer dep on it, I think we can move this into schema directly, which (as a side effect) allows customising the loading template by end users.

This also means we can decouple the template from nuxi itself.

πŸ“ Checklist

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

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@pi0
Copy link
Member
pi0 commented Jul 26, 2023

It is a good idea to remove the loading template as a bundled dependency of nuxt. But i am thinking why not make it a dependency of nuxt package? nuxi anyway requires to resolve nuxt as only guaranteed dependency from users rootDir. By exposing it from nuxt package, we are more sure to be pnpm compatible.

@danielroe
Copy link
Member Author

It is a dependency of Nuxt, as well.

Copy link
Member
@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. However, it shouldn't be a required dependency of schema IMO. Like every peer dep, it should come from nuxt and CLI resolve it on behalf of nuxt package but it is also a safe thing to do..

@danielroe danielroe merged commit 9741f26 into main Jul 26, 2023
@danielroe danielroe deleted the refactor/loading-template branch July 26, 2023 21:07
@github-actions github-actions bot mentioned this pull request Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for specification of UI templates module when using nuxi dev command
2 participants
0