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 "failed to load for SSR" error when removing Astro <style> blocks #4548

Merged
merged 8 commits into from
Aug 30, 2022

Conversation

bholmesdev
Copy link
Contributor

@bholmesdev bholmesdev commented Aug 29, 2022

Changes

  • Working towards 🏆 DX WEEK #4541 - "deleting a style tag killed the server!"
  • Reproducible when using Tailwind and removing a style tag that was present when the dev server started
  • Culprit: the ssrLoadModule attempt on .astro files. When using larger dependencies like Tailwind, the imported style module graph may be out-of-date. It seems this is no longer needed to load styles with HMR in Vite 3. Waiting for e2e tests to confirm! Oops, still needed for markdown. Decided a simple try / catch is the safest band-aid with @bluwy

Testing

Existing e2e tests should cover style reloading

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Aug 29, 2022

🦋 Changeset detected

Latest commit: 7a397bc

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

This PR includes changesets to release 14 packages
Name Type
astro Patch
@e2e/astro-component Patch
@e2e/error-react-spectrum Patch
@e2e/error-sass Patch
@e2e/errors Patch
@e2e/hydration-race Patch
@e2e/lit-component Patch
@e2e/preact-component Patch
@e2e/react-component Patch
@e2e/solid-component Patch
@e2e/solid-recurse Patch
@e2e/svelte-component Patch
@e2e/e2e-tailwindcss Patch
@e2e/ts-resolution 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 Aug 29, 2022
@bholmesdev bholmesdev merged commit 69b640b into main Aug 30, 2022
@bholmesdev bholmesdev deleted the fix/style-ssr-error branch August 30, 2022 15:27
@astrobot-houston astrobot-houston mentioned this pull request Aug 30, 2022
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.

2 participants