Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitccf9b48

Browse files
committed
clean up
1 parent7e2f187 commitccf9b48

File tree

2 files changed

+1
-41
lines changed

2 files changed

+1
-41
lines changed

‎readme.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,4 +462,4 @@
462462
1. NextJs, next-pwa, workbox are still growing their api, so this project setup will be modified in the future for easier setup.
463463
2. There is a known error on the workbox: https://github.com/GoogleChrome/workbox/issues/2178.
464464
3. The `subdomainPrefix` config is based on the unapproved pr https://github.com/shadowwalker/next-pwa/pull/33.
465-
4.All indirect children in `next/head` willnotbe picked up at build time, so all `next/link` wrapped elements must be inserted after the `next/head` is loaded.
465+
4.Only direct children in `next/head` will be picked up at build time, so all `next/link` wrapped elements must be inserted (useEffect) after the `next/head` is loaded.

‎src/features/head/ManifestHead.tsx‎

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -43,46 +43,6 @@ const ManifestHead: FC<Props> = ({
4343
isAmp,
4444
children,
4545
})=>{
46-
// const linkToAdd: Record<string, { [key in string]: string }> = {};
47-
// if (hrefManifest) {
48-
// linkToAdd.manifest = { href: join(linkPrefix, hrefManifest) };
49-
// }
50-
// if (!isAmp && hrefCanonical) {
51-
// linkToAdd.canonical = { href: join(linkPrefix, hrefCanonical) };
52-
// }
53-
// if (favIconPath) {
54-
// linkToAdd['shortcut icon'] = { href: join(linkPrefix, favIconPath) };
55-
// }
56-
// if (appleIconPath) {
57-
// linkToAdd['apple-touch-icon'] = {
58-
// href: join(linkPrefix, appleIconPath),
59-
// sizes: appleIconSize,
60-
// };
61-
// }
62-
63-
// useEffect(() => {
64-
// const linkTags = Object.entries(linkToAdd).map(([rel, attrs]) => {
65-
// const tag = document.createElement('link');
66-
// tag.setAttribute('rel', rel);
67-
// Object.keys(attrs).forEach((attr) => {
68-
// tag.setAttribute(attr, attrs[attr]);
69-
// });
70-
// return tag;
71-
// });
72-
// const headElement = document.getElementsByTagName('head').item(0);
73-
// linkTags.forEach((tag) => {
74-
// if (headElement) {
75-
// headElement.appendChild(tag);
76-
// }
77-
// });
78-
// return () => {
79-
// linkTags.forEach((tag) => {
80-
// if (headElement) {
81-
// headElement.removeChild(tag);
82-
// }
83-
// });
84-
// };
85-
// }, []);
8646
return(
8747
<NextHead>
8848
<titlekey="title">{title}</title>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp