diff --git a/packages/stack-sc/.gitignore b/packages/stack-sc/.gitignore
new file mode 100644
index 000000000..aabd4585a
--- /dev/null
+++ b/packages/stack-sc/.gitignore
@@ -0,0 +1,2 @@
+# we need to not ignore the next-env.d.ts file because it is not automatically recreated (we never run `next build` in this repo directly because Next is just a peer dependency)
+!next-env.d.ts
diff --git a/packages/stack-sc/next-env.d.ts b/packages/stack-sc/next-env.d.ts
new file mode 100644
index 000000000..4f11a03dc
--- /dev/null
+++ b/packages/stack-sc/next-env.d.ts
@@ -0,0 +1,5 @@
+///
+///
+
+// NOTE: This file should not be edited
+// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/packages/stack-sc/package.json b/packages/stack-sc/package.json
index 1ae1c3462..22001a923 100644
--- a/packages/stack-sc/package.json
+++ b/packages/stack-sc/package.json
@@ -31,14 +31,17 @@
"peerDependenciesMeta": {
"react": {
"optional": true
+ },
+ "next": {
+ "optional": true
}
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6",
"@typescript-eslint/parser": "^6.x",
+ "@types/react": "^18.2.0",
"eslint": "^8",
"eslint-config-next": "^14",
- "rimraf": "^5.0.5",
- "react": "^18.2.0"
+ "rimraf": "^5.0.5"
}
}
diff --git a/packages/stack-sc/tsconfig.json b/packages/stack-sc/tsconfig.json
index fc70ff9d6..10228e18a 100644
--- a/packages/stack-sc/tsconfig.json
+++ b/packages/stack-sc/tsconfig.json
@@ -10,6 +10,6 @@
"esModuleInterop": true,
"strict": true
},
- "include": ["src/**/*"],
+ "include": ["src/**/*", "next-env.d.ts"],
"exclude": ["node_modules", "dist"]
}
diff --git a/packages/stack/tsconfig.json b/packages/stack/tsconfig.json
index 6d3c33869..ccd32684a 100644
--- a/packages/stack/tsconfig.json
+++ b/packages/stack/tsconfig.json
@@ -8,8 +8,7 @@
"module": "ES2020",
"moduleResolution": "Bundler",
"esModuleInterop": true,
- "strict": true,
- "skipLibCheck": true
+ "strict": true
},
"include": ["next-env.d.ts", "src/**/*", ".next/types/**/*.ts"],
"exclude": ["node_modules", "dist"]
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 37f933f20..6e87146f2 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -261,7 +261,13 @@ importers:
next:
specifier: ^14.1
version: 14.1.0(react-dom@18.2.0)(react@18.2.0)
+ react:
+ specifier: ^18.2.0
+ version: 18.2.0
devDependencies:
+ '@types/react':
+ specifier: ^18.2.0
+ version: 18.2.60
'@typescript-eslint/eslint-plugin':
specifier: ^6
version: 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.30.0)(typescript@5.3.3)
@@ -274,9 +280,6 @@ importers:
eslint-config-next:
specifier: ^14
version: 14.1.0(eslint@8.30.0)(typescript@5.3.3)
- react:
- specifier: ^18.2.0
- version: 18.2.0
rimraf:
specifier: ^5.0.5
version: 5.0.5