Check for `isSsrBuild` is incorrect
johnzanussi opened this issue · 2 comments
johnzanussi commented
When using @astro/vercel
adapter with the static
target this plugin incorrectly sets isSsrBuild
to true which causes the build to fail.
https://docs.astro.build/en/guides/integrations-guide/vercel/#targets
// astro.config.mjs
import vercel from '@astrojs/vercel/static';
export default defineConfig({
...
output: 'static',
adapter: vercel(),
...
});
astro-imagetools/integration/index.js
// astro-imagetools/integration/index.js
export default {
name: "astro-imagetools",
hooks: {
"astro:config:setup": async function ({ config, command, updateConfig }) {
const environment = command;
const isSsrBuild = command === "build" && !!config.adapter;
...
It seems as if an additional check for config.output === 'server'
is necessary to support Vercel's static
output target.
I'm happy to open a PR to fix this issue if ya'll are accepting them.
johnzanussi commented
I created a PR for the fix. #158
RafidMuhymin commented
Thanks for opening the issue. Closing this since #158 has been merged.