You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a new `astro:routes:resolved` hook to the Integration API. Also update the `astro:build:done` hook by deprecating `routes` and adding a new `assets` map.
6
+
7
+
When building an integration, you can now get access to routes inside the `astro:routes:resolved` hook:
8
+
9
+
```js
10
+
constintegration= () => {
11
+
return {
12
+
name:'my-integration',
13
+
hooks: {
14
+
'astro:routes:resolved': ({ routes }) => {
15
+
console.log(routes)
16
+
}
17
+
}
18
+
}
19
+
}
20
+
```
21
+
22
+
This hook runs before `astro:config:done`, and whenever a route changes in development.
23
+
24
+
The `routes` array from `astro:build:done` is now deprecated, and exposed properties are now available on `astro:routes:resolved`, except for `distURL`. For this, you can use the newly exposed `assets` map:
0 commit comments