Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,19 +273,18 @@ const appVite = {
// https://astro.build/config
export default defineConfig({
site: "https://developers.cloudflare.com",
experimental: {
incrementalBuild: true,
},
prefetch: {
prefetchAll: true,
defaultStrategy: "hover",
},
outDir: "./dist",
cacheDir: ".astro-cache",
markdown,
image: {
service: {
entrypoint: "astro/assets/services/sharp",
config: {
limitInputPixels: false,
},
entrypoint: "@astrojs/cloudflare/image-service",
},
},
server: {
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"format:data:fix": "prettier --write \"**/*.{json,yaml,yml}\"",
"format:content:check": "prettier --check \"**/*.astro\"",
"format:content:fix": "prettier --write \"**/*.astro\"",
"postinstall": "patch-package",
"preview": "astro preview",
"script:optimize-svgs": "tsx scripts/optimize-svgs.ts",
"start": "astro dev",
Expand All @@ -44,7 +43,8 @@
"@actions/github": "9.1.1",
"@apidevtools/swagger-parser": "12.1.0",
"@astrojs/check": "0.9.10",
"@astrojs/markdown-remark": "7.2.1",
"@astrojs/cloudflare": "14.1.7",
"@astrojs/markdown-remark": "7.2.2",
"@astrojs/markdown-satteri": "0.3.4",
"@astrojs/mdx": "^7.0.4",
"@astrojs/react": "^6.0.1",
Expand Down Expand Up @@ -82,7 +82,7 @@
"@types/react-dom": "19.0.4",
"@types/unist": "3.0.3",
"@typescript-eslint/parser": "8.65.0",
"astro": "^7.1.4",
"astro": "https://pkg.pr.new/astro@17632",
"astro-icon": "1.1.5",
"astro-skills": "0.1.1",
"cidr-tools": "12.1.2",
Expand Down Expand Up @@ -116,7 +116,6 @@
"node-html-parser": "9.0.0",
"openapi-types": "12.1.3",
"parse-duration": "2.1.8",
"patch-package": "8.0.1",
"prettier": "3.9.6",
"prettier-plugin-astro": "0.14.1",
"prettier-plugin-tailwindcss": "0.8.1",
Expand Down
15 changes: 15 additions & 0 deletions patches/astro-icon@1.1.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/dist/loaders/loadLocalCollection.js b/dist/loaders/loadLocalCollection.js
index 2d8e1d4f32ea05b73080eb1f483ad2dc14dbd488..e0d6203ddf1d62a3ab85797441e10ecf9d4bc5a3 100644
--- a/dist/loaders/loadLocalCollection.js
+++ b/dist/loaders/loadLocalCollection.js
@@ -41,7 +41,9 @@ export default async function createLocalCollection(dir, options = { plugins: ["
// Update icon
local.fromSVG(name, svg);
});
- return local.export(true);
+ const collection = local.export(true);
+ delete collection.lastModified;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required because \0virtual:astro-icon uses a lastModified from when the collection is generated.

This clears the cacheKey on every single build.

By removing this, the local.icons object is used instead with deep-equality for computing the hash.

That's stable between builds. (This is used on ~50 pages, so we don't want this 1 package to prevent restoring 6,846!)

+ return collection;
}
async function convertToCurrentColor(svg) {
await parseColors(svg, {
Loading
Loading