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

Prevent the server plugin from running during the build #2552

Merged
merged 3 commits into from
Feb 8, 2022

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Feb 8, 2022

Changes

  • Makes it so that the Vite server plugin only runs during astro dev. Running during build is both unnecessary and causes the manifest to be rebuilt constantly because the filewatcher fires often during the build.

Testing

No way to test.

Docs

N/A, bug fix

@changeset-bot
Copy link

changeset-bot bot commented Feb 8, 2022

🦋 Changeset detected

Latest commit: 29ad57c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
astro Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Feb 8, 2022
Comment on lines +54 to +56
// The server plugin is for dev only and having it run during the build causes
// the build to run very slow as the filewatcher is triggered often.
mode === 'dev' && astroViteServerPlugin({ config: astroConfig, logging }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@FredKSchott
Copy link
Member

LETS GO!!! great find

@github-actions github-actions bot added the test label Feb 8, 2022
@matthewp matthewp merged commit e81bc3c into main Feb 8, 2022
@matthewp matthewp deleted the sb-no-server-plugin branch February 8, 2022 21:55
@github-actions github-actions bot mentioned this pull request Feb 8, 2022
@github-actions github-actions bot mentioned this pull request Feb 18, 2022
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
* Prevent the server plugin from running during the build

* Adds a changeset

* More all before blocks to inside of a describe()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants