Warning: The getStaticPaths() statement has been ignored because output: "server"
is set.
#7869
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
What version of
astro
are you using?2.9.6
Are you using an SSR adapter? If so, which one?
@astrojs/node
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
I added a Markdown formatted page in the src
directory and executing npm run build in server-side rendering mode I get the following warning message:
I found that it is caused by the logic judgment of
vite-plugin-scanner
under astro(the version of astro is 2.9.6), and the file path isastro/dist/vite-plugin-scanner/index.js
, where there is a judgment of :! pageOptions.prerender && isServerLikeOutput(settings.config) && code.includes("getStaticPaths")
it so happens that my post mentions the getStaticPaths method in next.js. which, in astro server-side rendering mode, gave me the warning message mentioned above
What's the expected result?
I hope the code will be more accurate in determining the inclusion of "getStaticPaths" and won't issue a similar warning!
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-gsrh1x?file=astro.config.mjs&on=stackblitz
Participation
The text was updated successfully, but these errors were encountered: