Skip to content
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

fix(module): no type information on runtime components #15683

Closed
dargmuesli opened this issue Dec 8, 2022 · 2 comments
Closed

fix(module): no type information on runtime components #15683

dargmuesli opened this issue Dec 8, 2022 · 2 comments

Comments

@dargmuesli
Copy link
Member

Environment

  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: npm@7.17.0
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/nuxt-starter-qspr4q?file=src%2Fruntime%2Fcomponents%2FTest.vue,playground%2Fnuxt.config.js

Describe the bug

This bug is about vscode type hints. Because I get no type hints at all on Stackblitz, it appears to be required to download the stackblitz repo and check it out manually, I'm afraid. Here are the steps required after download and extraction:

  • run npm i and npm run prepare
  • hover ref in line 8 of src/runtime/components/Test.vue and see that there are no type hints popping up
  • uncomment the 4th line in playground/nuxt.config.js and run npm run prepare again
  • see that the type hints from before are now shown

I'd expect the type hints to show right away. @danielroe once fixed this in nuxt/framework#7726 I believe, but apparently there is more to it, maybe a misunderstanding.

Additional context

No response

Logs

No response

Copy link
Member

danielroe commented Dec 8, 2022

That PR led to unwanted behaviour in monorepos so we now have a specific option for module authors and others who want types to be applied across a workspace:

  export default defineNuxtConfig({
    typescript: {
+     includeWorkspace: true,
      tsConfig: {
        // include: ['../../**/*'], // https://github.com/nuxt/framework/pull/7726
      },
    },
  });

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2022
@dargmuesli
Copy link
Member Author

Thank you for that information! <3 I missed that.

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants