-
Notifications
You must be signed in to change notification settings - Fork 27k
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: Make tsconfig.json path depend on cwd #7798
fix: Make tsconfig.json path depend on cwd #7798
Conversation
- This is to support nested directory hierarchy - where there are multiple parent directories containing the pages directory.
Stats from current PRClick to expand stats
Click to expand serverless stats
|
Hey as explained here: #7782 (comment) the behavior was actually correct. @Timer mistook the reproduction steps as the reverse of what was being displayed, but the current behavior in stable is correct as there might be settings that collide for example in a monorepo environment. Hence why the file is being placed where it is. Thank you very much for your contribution 🙏 |
Until Next.js time then... 🥁🥁🥁 |
I've been using TypeScript with Next.js since V8 (with a custom Any solution / workaround to this problem @timneutkens? |
@wouterds the workaround is mentioned here: #7782 (comment) |
I also have a few projects where all the source files are in As a result, configuring const app = next({
dir: __dirname,
conf:
env.NODE_ENV === "production"
? { distDir: "../.next", poweredByHeader: false }
: undefined,
dev: env.NODE_ENV !== "production",
}); After upgrading to Next 9 there some extra mess related to If only we could configure Having all source in |
@timneutkens Damn that's an ugly workaround. Seems a bit out of scope to this issue but I agree with @kachkaev, I'd like to have all my application code in |
This PR has been created to support nested directory hierarchy, where there are multiple parent directories containing the
pages
directory.This is so that
tsconfig.json
auto-generates in the project root - TypeScript documentation.Reference: process.cwd()
fixes: #7782