[ci] format
This commit is contained in:
parent
c6f8bce7c3
commit
340cc1c8e4
3 changed files with 11 additions and 8 deletions
|
@ -16,7 +16,7 @@ function createRouteData(
|
|||
// TODO bring back
|
||||
generate: () => '',
|
||||
pathname: pathname || undefined,
|
||||
segments
|
||||
segments,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,8 @@ function netlifyFunctions({ dist }: NetlifyFunctionsOptions = {}): AstroIntegrat
|
|||
_redirects += `
|
||||
${route.pathname} /.netlify/functions/${entryFile} 200`;
|
||||
} else {
|
||||
const pattern = '/' + route.segments.map(([part]) => part.dynamic ? '*' : part.content).join('/');
|
||||
const pattern =
|
||||
'/' + route.segments.map(([part]) => (part.dynamic ? '*' : part.content)).join('/');
|
||||
_redirects += `
|
||||
${pattern} /.netlify/functions/${entryFile} 200`;
|
||||
}
|
||||
|
|
|
@ -16,16 +16,18 @@ describe('Dynamic pages', () => {
|
|||
ssr: true,
|
||||
},
|
||||
adapter: netlifyAdapter({
|
||||
dist: new URL('./fixtures/dynamic-route/dist/', import.meta.url)
|
||||
dist: new URL('./fixtures/dynamic-route/dist/', import.meta.url),
|
||||
}),
|
||||
site: `http://example.com`,
|
||||
vite: {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@astrojs/netlify/netlify-functions.js': fileURLToPath(new URL('../dist/netlify-functions.js', import.meta.url))
|
||||
}
|
||||
}
|
||||
}
|
||||
alias: {
|
||||
'@astrojs/netlify/netlify-functions.js': fileURLToPath(
|
||||
new URL('../dist/netlify-functions.js', import.meta.url)
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
await fixture.build();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue