summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/gorgeous-baboons-sleep.md5
-rw-r--r--.changeset/neat-phones-sin.md5
-rw-r--r--packages/astro/src/core/config/tsconfig.ts2
-rw-r--r--packages/integrations/react/package.json3
4 files changed, 14 insertions, 1 deletions
diff --git a/.changeset/gorgeous-baboons-sleep.md b/.changeset/gorgeous-baboons-sleep.md
new file mode 100644
index 000000000..98975c390
--- /dev/null
+++ b/.changeset/gorgeous-baboons-sleep.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fix `astro add` trying to add lines from extended configurations when adding frameworks
diff --git a/.changeset/neat-phones-sin.md b/.changeset/neat-phones-sin.md
new file mode 100644
index 000000000..9a77e4731
--- /dev/null
+++ b/.changeset/neat-phones-sin.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/react': patch
+---
+
+Add `@types/` packages as peerDependencies
diff --git a/packages/astro/src/core/config/tsconfig.ts b/packages/astro/src/core/config/tsconfig.ts
index be73af077..7ffb88087 100644
--- a/packages/astro/src/core/config/tsconfig.ts
+++ b/packages/astro/src/core/config/tsconfig.ts
@@ -56,6 +56,7 @@ export function loadTSConfig(cwd: string | undefined, resolve = true): tsr.TsCon
let config = tsr.tsconfigResolverSync({
cwd,
filePath: resolve ? undefined : cwd,
+ ignoreExtends: !resolve,
});
// When a direct filepath is provided to `tsconfigResolver`, it'll instead return invalid-config even when
@@ -70,6 +71,7 @@ export function loadTSConfig(cwd: string | undefined, resolve = true): tsr.TsCon
cwd,
filePath: resolve ? undefined : cwd,
searchName: 'jsconfig.json',
+ ignoreExtends: !resolve,
});
if (
diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json
index 980752eec..d4519025a 100644
--- a/packages/integrations/react/package.json
+++ b/packages/integrations/react/package.json
@@ -48,7 +48,8 @@
"peerDependencies": {
"react": "^17.0.2 || ^18.0.0",
"react-dom": "^17.0.2 || ^18.0.0",
- "@types/react": "^17.0.50 || ^18.0.21"
+ "@types/react": "^17.0.50 || ^18.0.21",
+ "@types/react-dom": "^17.0.17 || ^18.0.6"
},
"engines": {
"node": "^14.18.0 || >=16.12.0"