Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: recreate API when Vite command changes #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

XiNiHa
Copy link

@XiNiHa XiNiHa commented Jul 24, 2023

Currently, this plugin doesn't work well in build when used with Astro. It's because the configResolved hook gets called three times: first with the serve command, then two builds for server and client. This breaks the current logic of caching the api object, since the command changes to build after the first serve step, while the isBuild property should change as the command parameter changes. This PR fixes the issue by checking if the command has changed.

@netlify
Copy link

netlify bot commented Jul 24, 2023

Deploy Preview for image-presets ready!

Name Link
🔨 Latest commit 8d36764
🔍 Latest deploy log https://app.netlify.com/sites/image-presets/deploys/64be6013b0d77800086853cc
😎 Deploy Preview https://deploy-preview-28--image-presets.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant