Skip to content

docs: add tip for when using auto imports #4112

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

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

HanKruiger
Copy link

πŸ”— 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)
  • ✨ 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

To streamline on-boarding when using the official Vue.js starter, I added a tip to the docs to prevent others from encountering an issue that I tackled recently.

The problem I encountered was:

  • Vue.js official starter uses run-p type-check \"build-only {@}\" -- as the build step. This builds the application in parallel with type-checking.
  • That sounds nice, but the type declaration files that unplugin-auto-import generates are only generated in the build-only script, so when building in a fresh environment, type checking fails.
  • I resolved it by replacing run-p type-check \"build-only {@}\" -- with run-s \"build-only {@}\" type-check --.

πŸ“ Checklist

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

Copy link

pkg-pr-new bot commented May 9, 2025

npm i https://pkg.pr.new/@nuxt/ui@4112

commit: 1a5c19c

@benjamincanac
Copy link
Member

I'm not sure about this, I would just move the typecheck to a different command: https://github.com/nuxt-ui-pro/starter-vue/blob/main/package.json#L7

@HanKruiger
Copy link
Author

That makes sense as well! Then you'd need to make sure to run it in your CI though, to guarantee type safety in the code you ship.

I do feel like the documentation should at least accommodate the path from the official Vue.js starter a bit clearer though!

But feel free to close / change this PR. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants