šæ Minor Changes
-
#12924
3caa337Thanks @florian-lefebvre! - Updates how the output is determined increateRedirectsFromAstroRoutes. Sincev0.5.0, the output would use thebuildOutputproperty andconfig.outputas a fallback. It no longer uses this fallback. -
#12924
3caa337Thanks @florian-lefebvre! - Updates the input requirements ofcreateRedirectsFromAstroRoutes:routeToDynamicTargetMapkeys areIntegrationResolvedRouteinstead ofIntegrationRouteData(obtained from theastro:routes:resolvedhook)- Thereās a new
assetsproperty, that can be obtained from theastro:build:donehook
function myIntegration() {let routes;let buildOutput;let config;return {name: 'my-integration',hooks: {'astro:routes:resolved': (params) => {routes = params.routes;},'astro:config:done': (params) => {buildOutput = params.buildOutput;config = params.config;},'astro:build:done': (params) => {const redirects = createRedirectsFromAstroRoutes({config,buildOutput,routeToDynamicTargetMap: new Map(routes.map((route) => [route, ''])),dir: params.dir,assets: params.assets,});},},};}