Skip to content

Commit d59fe3b

Browse files
committed
fix: dev build very slow
1 parent 70dc9e4 commit d59fe3b

File tree

11 files changed

+20
-11
lines changed

11 files changed

+20
-11
lines changed

src/components/BackButton.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import { ChevronLeft } from "@lucide/astro";
2+
import ChevronLeft from "@lucide/astro/icons/chevron-left";
33
import LinkButton from "./LinkButton.astro";
44
---
55
<div class="mx-auto flex w-full max-w-app items-center justify-start px-2">

src/components/BackToTopButton.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
import { ArrowUp, ChevronLeft } from "@lucide/astro";
2+
import ArrowUp from "@lucide/astro/icons/arrow-up";
3+
import ChevronLeft from "@lucide/astro/icons/chevron-left";
34
---
45
<div
56
id="btt-btn-container"

src/components/Datetime.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import { CalendarDays } from "@lucide/astro";
2+
import CalendarDays from "@lucide/astro/icons/calendar-days";
33
import dayjs from "dayjs";
44
import timezone from "dayjs/plugin/timezone";
55
import utc from "dayjs/plugin/utc";

src/components/Pagination.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
import type { CollectionEntry } from "astro:content";
3-
import { ArrowLeft, ArrowRight } from "@lucide/astro";
3+
import ArrowLeft from "@lucide/astro/icons/arrow-left";
4+
import ArrowRight from "@lucide/astro/icons/arrow-right";
45
import type { Page } from "astro";
56
import LinkButton from "./LinkButton.astro";
67

src/components/Tag.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import { Hash } from "@lucide/astro";
2+
import Hash from "@lucide/astro/icons/hash";
33
44
export interface Props {
55
tag: string;

src/components/about/ContactMe.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import { Mail } from "@lucide/astro";
2+
import Mail from "@lucide/astro/icons/mail";
33
---
44
<p class="flex items-center gap-2">
55
<Mail/>

src/constants.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { Mail } from "@lucide/astro";
1+
// import { Mail } from "@lucide/astro" 这种写法会使 dev 下的构建时间巨量增加
2+
// https://github.com/withastro/astro/issues/12793
3+
import Mail from "@lucide/astro/icons/mail";
24
import type { Props } from "astro";
35
import CnBlogs from "@/assets/CnBlogs.svg";
46
import Github from "@/assets/Github.svg";

src/layouts/BaseHeader.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
2-
import { Menu as IconMenu, Search as IconSearch, Moon, Sun, X } from "@lucide/astro";
2+
import IconMenu from "@lucide/astro/icons/menu";
3+
import Moon from "@lucide/astro/icons/moon";
4+
import IconSearch from "@lucide/astro/icons/search";
5+
import Sun from "@lucide/astro/icons/sun";
6+
import X from "@lucide/astro/icons/x";
37
import LinkButton from "@/components/LinkButton.astro";
48
import { SITE } from "@/config";
59
import { NAV_LINKS } from "@/constants";

src/layouts/PostDetails.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
import { type CollectionEntry, render } from "astro:content";
3-
import { ChevronLeft, ChevronRight } from "@lucide/astro";
3+
import ChevronLeft from "@lucide/astro/icons/chevron-left";
4+
import ChevronRight from "@lucide/astro/icons/chevron-right";
45
import BackButton from "@/components/BackButton.astro";
56
import BackToTopButton from "@/components/BackToTopButton.astro";
67
import Datetime from "@/components/Datetime.astro";

src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import { getCollection } from "astro:content";
3-
import { Rss } from "@lucide/astro";
3+
import Rss from "@lucide/astro/icons/rss";
44
import BetterHr from "@/components/BetterHr.astro";
55
import CardPostList from "@/components/CardPostList.astro";
66
import LinkButton from "@/components/LinkButton.astro";

0 commit comments

Comments
 (0)