-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: subdirectory deployment #2205
Conversation
I have no idea why #2194 was merged, its an empty PR and was blocked, huh? Edit: actually even weirder the commit from that PR is for a completely different PR. Weird. Anyway, thanks for re-creating |
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.
In general this seems fine to me. I havent tried setting up a subdirectory deployment however, because I find them to be a bit of a pain.
In general seems safe, so OK by me, but curious if @benphelps has any other thoughts
you might want to disable the pull bot on your fork, seems to break your PRs. Or you also might avoid this by making PRs from a branch not main, but I’m not sure |
I'm sure this will have some adverse effects for a handful of users, but is worth the trouble to get this recurring issue taken care of. |
sorry. i see. I will disable the pull bot. |
I see some problems in issue, I try to solve them, and it seems no problems at present. Thanks for your guidance. ^v^. |
Hmm, this might have broken the font, now getting a 404 and loading https://**/_next/static/css/_next/static/media/Manrope.63012343.woff2 I'll try to investigate |
@alfred-nice unfortunately we're going to revert this change for now, it does seem to break the font and the fix is not obvious, sort of a catch-22 with importing the font files into the css and a relative URL. Of course if you can solve it we'd be happy to merge a subsequent PR. Thanks for your effort. |
When subdirectory deployment, the correct path should be /homepage/_next/static/media/Manrope.63012343.woff2 (200 good), not /homepage/_next/static/css/_next/static/media/Manrope.63012343.woff2 (404 bad). I'm not sure where this font was imported from, and I don't have much knowledge about Next.js. I would greatly appreciate it if someone could provide me with guidance on this matter. Thanks! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
Proposed change
Closes #2128 #539
Type of change
Checklist:
pnpm lint
.tips:
next.config.js. add
assetPrefix: ".",
others. mod
/api/xxx
toapi/xxx
.thanks for @benphelps @shamoon guides. #2194
I am learning to contribute code & PR. If there are any mistakes, I kindly request guidance from everyone.