* 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
* Ensure multiple cookies set in dev result in multiple set-cookie headers
* Adding a changeset
* Try connecting to localhost instead
* use localhost in the Host header
* Use 0.0.0.0
* localhost it is
* 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