forked from laptou/astro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
--experimental-ssr
fixes (withastro#2937)
* Replaced `--experimental-ssr` with `isBuildingToSSR` * changest * Improved `isBuildingToSSR` a bit * Added `isBuildingToSSR` to more places!!1! * Added `@deprecated` tag * Replaced missing experimentalSsr * Added failing test * Removed test * Re-added experimental ssr flag * Fixed typo Co-authored-by: Matthew Phillips <matthew@skypack.dev> * Fixed deno tests Co-authored-by: Matthew Phillips <matthew@skypack.dev>
- Loading branch information
Showing
13 changed files
with
44 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import type { EndpointHandler } from '../../../@types/astro'; | ||
import type { SSROptions } from '../../render/dev'; | ||
import { preload } from '../../render/dev/index.js'; | ||
import { isBuildingToSSR } from '../../util.js'; | ||
import { call as callEndpoint } from '../index.js'; | ||
|
||
export async function call(ssrOpts: SSROptions) { | ||
const [, mod] = await preload(ssrOpts); | ||
return await callEndpoint(mod as unknown as EndpointHandler, { | ||
...ssrOpts, | ||
ssr: ssrOpts.astroConfig.buildOptions.experimentalSsr, | ||
ssr: isBuildingToSSR(ssrOpts.astroConfig), | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters