-
Notifications
You must be signed in to change notification settings - Fork 2k
refactor(examples): remove duplicate Next.js plugin in examples #10620
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
base: main
Are you sure you want to change the base?
refactor(examples): remove duplicate Next.js plugin in examples #10620
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@JeongHwan-dev is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
I believe these were there because Next.js used to add them back when you run |
@anthonyshew |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh, looks like I was too optimistic. I tried to run the with-tailwind
build locally and it looks like the build fails now with this error:
> next build
⨯ Failed to load next.config.ts, see more info here https://nextjs.org/docs/messages/next-config-error
> Build error occurred
[TypeError: Cannot read properties of undefined (reading 'baseUrl')]
Fix "Cannot read properties of undefined (reading 'baseUrl')" error in Next.js build by adding baseUrl configuration to tsconfig.json.
Thanks for catching this! I've fixed the issue by adding The error was occurring because Next.js was trying to access the Changes made:
The build should now complete successfully. ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. with-tailwind
has that need because it's using next.config.ts
instead of .js
. Today, I learned.
Thanks for doing this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was once again too optimistic. My apologies. I don't think we'll be able to merge this because of how Next.js works.
When I run turbo build
in the basic
example, these log lines appear:
Your tsconfig.json extends another configuration, which means we cannot add the Next.js TypeScript plugin automatically. To improve your development experien
ce, we recommend adding the Next.js plugin (`"plugins": [{ "name": "next" }]`) manually to your TypeScript configuration. Learn more: https://nextjs.org/docs
/app/api-reference/config/typescript#the-typescript-plugin
If we remove that, we'll get an issue the next day about that log line. I can guarantee it, going off of past experience. 😄 Unless there's a way to make it so that we can remove the plugin from the applications' configuration and not see a log about it being missing, I don't think we'll be able to do this.
Description
Removes duplicate Next.js TypeScript plugin configuration from
examples/.../apps/web/tsconfig.json
.The
"next"
plugin was configured in two places:packages/typescript-config/nextjs.json
(shared config)apps/web/tsconfig.json
(duplicate)Since the app already extends the shared config, the duplicate plugin definition is unnecessary.
File:
examples/.../apps/web/tsconfig.json
Removed:
The plugin is already inherited from
@repo/typescript-config/nextjs.json
.