Skip to content

Commit

Permalink
chore: clean prefetch (#48)
Browse files Browse the repository at this point in the history
> 去除 link prefetch,减少无效请求
* ♻️ 去除 link prefetch
* ♻️ 去除中间件和 api 相关路由
  • Loading branch information
elrrrrrrr authored Oct 16, 2023
1 parent 4d23e39 commit 7cf57b8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 168 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
package-lock.json

dist/
66 changes: 0 additions & 66 deletions src/middleware.ts

This file was deleted.

75 changes: 0 additions & 75 deletions src/pages/api/info.ts

This file was deleted.

26 changes: 0 additions & 26 deletions src/pages/api/spec.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/slugs/versions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function TagsList({
return (
<li className={styles.versionsItem} key={item}>
<span>
<Link href={`/package/${pkg!.name}/home?version=${item}`}>
<Link prefetch={false} href={`/package/${pkg!.name}/home?version=${item}`}>
{item}
</Link>
</span>
Expand Down Expand Up @@ -166,6 +166,7 @@ function VersionsList({
<li className={styles.versionsItem} key={item.version}>
<span>
<Link
prefetch={false}
style={
item.deprecated
? {
Expand Down

0 comments on commit 7cf57b8

Please sign in to comment.