#VS Code plugin to display if server or client component

1 messages · Page 1 of 1 (latest)

wicked jacinth
#

Is there a VS Code plugin that displays if the component in a file is a server or client component?

delicate ravineBOT
#

Hi @wicked jacinth. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Next.js includes a custom TypeScript plugin and type checker, which VSCode and other code editors can use for advanced type-checking and auto-completion. However, the extracts do not specifically mention a feature that displays if the component in a file is a server or client component.

To enable the TypeScript plugin in VS Code, you can follow these steps:

  1. Open the command palette (Ctrl/⌘ + Shift + P)
  2. Search for "TypeScript: Select TypeScript Version"
  3. Select "Use Workspace Version"

Now, when editing files, the custom plugin will be enabled. When running next build, the custom type checker will be used.

You can find more information about this in the Next.js documentation (https://nextjs.org/docs/app/building-your-application/configuring/typescript).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: