* Parallelize rendering of sibling components to avoid async waterfalls
* Catch and rethrow errors when eagerly rendering children
* Catch `Response` in rendering stage and throw error
* Add changeset
* Fix test error message
* Improve unit tests
* Start async generators in non-buffered mode, and only start buffering once a component doesn't resolve immediatly
* Add more documentation
* update config schema
* adapt default route `prerender` value
* adapt error message for hybrid output
* core hybrid output support
* add JSDocs for hybrid output
* dev server hybrid output support
* defer hybrid output check
* update endpoint request warning
* support `output=hybrid` in integrations
* put constant variable out of for loop
* revert: reapply back ssr plugin in ssr mode
* change `prerender` option default
* apply `prerender` by default in hybrid mode
* simplfy conditional
* update config schema
* add `isHybridOutput` helper
* more readable prerender condition
* set default prerender value if no export is found
* only add `pagesVirtualModuleId` ro rollup input in `output=static`
* don't export vite plugin
* remove unneeded check
* don't prerender when it shouldn't
* extract fallback `prerender` meta
Extract the fallback `prerender` module meta out of the `scan` function.
It shouldn't be its responsibility to handle that
* pass missing argument to function
* test: update cloudflare integration tests
* test: update tests of vercel integration
* test: update tests of node integration
* test: update tests of netlify func integration
* test: update tests of netlify edge integration
* throw when `hybrid` mode is malconfigured
* update node integraiton `output` warning
* test(WIP): skip node prerendering tests for now
* remove non-existant import
* test: bring back prerendering tests
* remove outdated comments
* test: refactor test to support windows paths
* remove outdated comments
* apply sarah review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* docs: `experiment.hybridOutput` jsodcs
* test: prevent import from being cached
* refactor: extract hybrid output check to function
* add `hybrid` to output warning in adapter hooks
* chore: changeset
* add `.js` extension to import
* chore: use spaces instead of tabs for gh formating
* resolve merge conflict
* chore: move test to another file for consitency
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* fix(middleware): emit warning if `next` is called and nothing is returned
* chore: add test case
* chore: changeset
* chore: restore code, ooops!
* chore: change logic
* change namespace
* feature(inline stylesheets): implement as experimental
* test: rename css-inline -> css-import-as-inline
* test(content collections): add de-duplication of css
* test: add new suite for inlineStylesheets configuration
* fix(inline stylesheets): did not act on propagated styles
* hack(inline stylesheets testing): duplicate fixtures
Content collections reuses build data across multiple fixture.builds, even though a configuration change may have changed it.
Duplicating fixtures avoids usage of the stale cache.
https://cdn.discordapp.com/attachments/1039830843440504872/1097795182340092024/Screenshot_87_colored.png
* refactor(css plugin): reduce nesting
* optimization(css rendering): merge <style> tags
Chrome, but not Safari or Firefox, is slower to match rules when they are split across multiple files or style tags.
https://nolanlawson.com/2022/06/22/style-scoping-versus-shadow-dom-which-is-fastest/
Having the abiility to inline stylesheets opens us up to this optimization.
Ideally, it would extend to propagated styles, but that ended up being a rabbit hole.
* typedocs(inlineStylesheets config): ensure consistency
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* chore(build internals): update comment
* correct minor mistake in test
* test(inline stylesheets): unique package names for duplicate fixtures
* refactor(css build plugin): maps -> records
* refactor(css build plugin): remove use of spread operator
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* feat(sitemap): support SSR generated routes
* feat(sitemap): add changeset for SSR support
* refactor: move logic to `astro:build:done`
* generate route to obey `trailingSlash` setting
* add logic to respect "directory" build format
* integration(sitemap): add unit test for ssr support
* Upgrade shiki
* Update themes
* Update languages
* Simplify
* Fix compat for other remark code
* Update theme again
* Fix language gen
* Add changeset
* Fix code
* Update test theme colors
* Update changeset
* Fix test again
* feat(vercel): Add support for image optimization API
* chore: changeset
* feat: implement image service
* feat: dev service
* feat: full local service
* fix: move assets check to astro:config:done
* feat: update with new settings
* fix: remove unused param
* test: add tsets
* fix: rename to imageService
* docs: add docs
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* docs(vercel): Add Added In mentions
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Add unit test for injected 404 routes
* Add fixture test for injected 404 routes
* Use any route pattern to find custom 404
* Fix frozen lockfile error
* Use `route` instead of `pattern` to match custom 404
Dynamic catch-all routes can match against `/404/` but will then error because they’re not actually designed to handle a param of `'404'`. Testing `route` instead excludes dynamic routes (because they’ll contain dynamic segments inside square brackets). Not sure if someone might _want_ to render the 404 via a dynamic route, but we already don’t support that, so this doesn’t change anything.
* Fix injected 404 fixture
* Add tests for `src/pages/404.html`
* Add changeset
* Fix lockfile
* And again
* Catch errors that occur within the stream in the Node adapter
* Adding a changeset
* Better error message on completely uncaught errors within the stream
* Update test
* fix#6420
* add test
* add test
* fix an error that parsed path
* fix path error when in Windows environment
* fix a path error
* update comment
---------
Co-authored-by: wuls <linsheng.wu@beantechs.com>