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

Feat: improve production build logging #2857

Merged
merged 17 commits into from
Mar 24, 2022

Conversation

bholmesdev
Copy link
Contributor

@bholmesdev bholmesdev commented Mar 22, 2022

Changes

  • Log setup steps as they occur with ms completed: initialization, entrypoint crawling, SSR bundling
  • Add structured heading for "building resources" step
  • Change Vite client build from "error" logging to "info" logging - currently SvelteKit's setup
  • Add structured heading for "generating static routes" step
    • log entry file
    • log all generated paths. Helpful when debugging getStaticPaths output
    • include different icons for pages (</>) vs. endpoints ({-})
  • out of scope: logging for generated SSR output. Planning a separate PR to pretty-print the generated manifest.json.

Testing

See for yourself!

prod-build-output.mov

Docs

N/A

@bholmesdev bholmesdev marked this pull request as draft March 22, 2022 17:57
@changeset-bot
Copy link

changeset-bot bot commented Mar 22, 2022

🦋 Changeset detected

Latest commit: c79c601

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 Mar 22, 2022
@bholmesdev bholmesdev marked this pull request as ready for review March 22, 2022 21:21
Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

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

lgtm

@bholmesdev bholmesdev force-pushed the feat/improved-production-build-output branch from 7623bb0 to 70f2601 Compare March 24, 2022 16:12
Copy link
Member

@FredKSchott FredKSchott left a comment

Choose a reason for hiding this comment

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

LGTM!

@bholmesdev bholmesdev force-pushed the feat/improved-production-build-output branch from cf622a8 to 73df0ad Compare March 24, 2022 17:37
@bholmesdev bholmesdev merged commit 1061d64 into main Mar 24, 2022
@bholmesdev bholmesdev deleted the feat/improved-production-build-output branch March 24, 2022 19:23
This was referenced Mar 24, 2022
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
* feat: log setup, vite, and route gen steps

* refactor: add back "build" + timestamp for consistency

* feat: improve ms increase logs to match old debug output

* feat: add log for server assets

* chore: remove redundant debug logs

* feat: add logs for ssr steps

* fix: hide  per-page log for ssr builds

* fix: hide "index.html" from debug log in SSR

* feat: add log for "collecting page data" step

* feat: add timeout logs for longer data imports

* chore: add changeset

* remove (includes setup + teardown)

* refactor: add newline to separate ssr from client build

* fix: move "gen static routes" heading to pages

* fix: only show client build ms when triggered

* fix: remove dup render loop

* chore: remove unused static-build imports
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.

3 participants