docs icon indicating copy to clipboard operation
docs copied to clipboard

Update manual install instructions for some UI frameworks

Open JusticeMatthew opened this issue 1 year ago • 1 comments

📚 Subject area/topic

Client-Side Interactivity

📋 Suggested page

https://docs.astro.build/en/guides/framework-components/

📋 General description or bullet points (if proposing new content)

The manual installation instructions for some UI frameworks do not include info about setting additional options in a ts.config when they are required (and are set by the astro CLI when using astro add)

As an example, when using npx astro add react the following is added to your TS config by the CLI:

  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "react"
  }

However the manual installation instructions do not tell the user to add these options, which has resulted in issues for users.

🖥️ Reproduction of code samples in StackBlitz

No response

JusticeMatthew avatar Oct 02 '24 14:10 JusticeMatthew

I just wanted to get the issue opened, when I have some time today I will check and see which other frameworks adjust the TS config and post here what they add

JusticeMatthew avatar Oct 02 '24 14:10 JusticeMatthew

Still sounds great! If someone would like to confirm what all is added by what all astro add commands, then we can add a step in each of these framework's manual install instructions to update ts.config appropriately!

We think this affects React, Preact, Vue, and Solid only

This link might help, or you can run astro add and see what happens!

https://github.com/withastro/astro/blob/73b6c8b1b35c320c29e6b628759f37903a4390bc/packages/astro/src/core/config/tsconfig.ts#L18

sarah11918 avatar Dec 19 '24 14:12 sarah11918

I will resolve this issue in #10608.

jsparkdev avatar Jan 04 '25 10:01 jsparkdev

This issue has been resolved, so closing it.

jsparkdev avatar Jan 08 '25 03:01 jsparkdev