withastro/astro
### [`v2.5.6`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#256)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.5...astro@2.5.6)
##### Patch Changes
- [#7193](https://togithub.com/withastro/astro/pull/7193) [`8b041bf57`](https://togithub.com/withastro/astro/commit/8b041bf57c76830c4070330270521e05d8e58474) Thanks [@ematipico](https://togithub.com/ematipico)! - Refactor how pages are emitted during the internal bundling. Now each
page is emitted as a separate entry point.
- [#7218](https://togithub.com/withastro/astro/pull/7218) [`6c7df28ab`](https://togithub.com/withastro/astro/commit/6c7df28ab34b756b8426443bf6976e24d4611a62) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix CSS deduping and missing chunks
- [#7235](https://togithub.com/withastro/astro/pull/7235) [`ee2aca80a`](https://togithub.com/withastro/astro/commit/ee2aca80a71afe843af943b11966fcf77f556cfb) Thanks [@MoustaphaDev](https://togithub.com/MoustaphaDev)! - Prioritize dynamic prerendered routes over dynamic server routes
- [#7192](https://togithub.com/withastro/astro/pull/7192) [`7851f9258`](https://togithub.com/withastro/astro/commit/7851f9258fae2f54795470253df9ce4bcd5f9cb0) Thanks [@ematipico](https://togithub.com/ematipico)! - Detect `mdx` files using their full extension
- [#7244](https://togithub.com/withastro/astro/pull/7244) [`bef3a75db`](https://togithub.com/withastro/astro/commit/bef3a75dbc48d584daff9f7f3d5a8937b0356170) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Remove the auto-generated `$entry` variable for Markdoc entries. To access frontmatter as a variable, you can pass `entry.data` as a prop where you render your content:
### [`v2.5.5`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#255)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.4...astro@2.5.5)
##### Patch Changes
- [#6832](https://togithub.com/withastro/astro/pull/6832) [`904131aec`](https://togithub.com/withastro/astro/commit/904131aec3bacb2824ad60457a45772eba27b5ab) Thanks [@wulinsheng123](https://togithub.com/wulinsheng123)! - fix a bug when Fragment is as a slot
- [#7178](https://togithub.com/withastro/astro/pull/7178) [`57e65d247`](https://togithub.com/withastro/astro/commit/57e65d247f67de61bcc3a585c2254feb61ed2e74) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Fix: revert Markdoc asset bleed changes. Production build issues were discovered that deserve a different fix.
### [`v2.5.4`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#254)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.3...astro@2.5.4)
##### Patch Changes
- [#7125](https://togithub.com/withastro/astro/pull/7125) [`4ce8bf7c6`](https://togithub.com/withastro/astro/commit/4ce8bf7c62d2b19ff7bd3dd0fbad88fcac10feaa) Thanks [@bluwy](https://togithub.com/bluwy)! - Make vite-plugin-content-virtual-mod run `getEntrySlug` 10 at a time to prevent `EMFILE: too many open files` error
- [#7166](https://togithub.com/withastro/astro/pull/7166) [`626dd41d0`](https://togithub.com/withastro/astro/commit/626dd41d0a80155f59962e3a1b70d8dfd2719d25) Thanks [@ematipico](https://togithub.com/ematipico)! - Move generation of renderers code into their own file
- [#7174](https://togithub.com/withastro/astro/pull/7174) [`92d1f017e`](https://togithub.com/withastro/astro/commit/92d1f017e5c0a921973e028b90c7975e74dce433) Thanks [@ematipico](https://togithub.com/ematipico)! - Remove restriction around serialisable data for `Astro.locals`
- [#7172](https://togithub.com/withastro/astro/pull/7172) [`2ca94269e`](https://togithub.com/withastro/astro/commit/2ca94269ed0b5046033c47985ef50b7e7a637caf) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Add types for `import.meta.env.ASSETS_PREFIX` and `import.meta.env.SITE`
- [#7134](https://togithub.com/withastro/astro/pull/7134) [`5b6a0312a`](https://togithub.com/withastro/astro/commit/5b6a0312a822565404a6334576677fc574cfcd56) Thanks [@alexvuka1](https://togithub.com/alexvuka1)! - value of var can be undefined when using `define:vars`
- [#7171](https://togithub.com/withastro/astro/pull/7171) [`79ba74832`](https://togithub.com/withastro/astro/commit/79ba74832fc46e6946c8235c33e9acfbb3a4139b) Thanks [@bluwy](https://togithub.com/bluwy)! - Prevent Vite watching on Astro config load
### [`v2.5.3`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#253)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.2...astro@2.5.3)
##### Patch Changes
- [#6758](https://togithub.com/withastro/astro/pull/6758) [`f558a9e20`](https://togithub.com/withastro/astro/commit/f558a9e2056fc8f2e2d5814e74f199e398159fc4) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Improve style and script handling across content collection files. This addresses style bleed present in `@astrojs/markdoc` v0.1.0
- [#7143](https://togithub.com/withastro/astro/pull/7143) [`b41963b77`](https://togithub.com/withastro/astro/commit/b41963b775149b802eea9e12c5fe266bb9a02944) Thanks [@johannesspohr](https://togithub.com/johannesspohr)! - Render 404 page content when a `Response` with status 404 is returned from a page
### [`v2.5.2`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#252)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.1...astro@2.5.2)
##### Patch Changes
- [#7144](https://togithub.com/withastro/astro/pull/7144) [`ba0636240`](https://togithub.com/withastro/astro/commit/ba0636240996f9f082d122a8414240196881cb96) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixed an issue where scripts that weren't safe to inline were inlined.
- [#7150](https://togithub.com/withastro/astro/pull/7150) [`8f418d13c`](https://togithub.com/withastro/astro/commit/8f418d13c5d5c9c40f05020205f24380b718654b) Thanks [@MoustaphaDev](https://togithub.com/MoustaphaDev)! - fix no matched path when using `getStaticPaths` without `prerender` export.
### [`v2.5.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#251)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.0...astro@2.5.1)
##### Patch Changes
- [#7128](https://togithub.com/withastro/astro/pull/7128) [`72f686a68`](https://togithub.com/withastro/astro/commit/72f686a68930de52f9a274c13c98acad59925b31) Thanks [@johannesspohr](https://togithub.com/johannesspohr)! - Fix routes created by `injectRoute` for SSR
- [#7132](https://togithub.com/withastro/astro/pull/7132) [`319a0a7a0`](https://togithub.com/withastro/astro/commit/319a0a7a0a6a950387c942b467746d590bb32fda) Thanks [@ematipico](https://togithub.com/ematipico)! - Emit middleware as an entrypoint during build
- [#7036](https://togithub.com/withastro/astro/pull/7036) [`852d59a8d`](https://togithub.com/withastro/astro/commit/852d59a8d68e124f10852609e0f1619d5838ac76) Thanks [@ematipico](https://togithub.com/ematipico)! - Emit pages as dynamic import chunks during the build
- [#7126](https://togithub.com/withastro/astro/pull/7126) [`530fb9ebe`](https://togithub.com/withastro/astro/commit/530fb9ebee77646921ec29d45d9b66484bdfb521) Thanks [@bluwy](https://togithub.com/bluwy)! - Add route information when warning of `getStaticPaths()` ignored
- [#7118](https://togithub.com/withastro/astro/pull/7118) [`3257dd289`](https://togithub.com/withastro/astro/commit/3257dd28901c785a6a661211b98c5ef2cb3b9aa4) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix unnecessary warning showing on start when a collection folder was empty. The warning was also enhanced to add more information about possible causes.
### [`v2.5.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#250)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.5...astro@2.5.0)
##### Minor Changes
- [#7071](https://togithub.com/withastro/astro/pull/7071) [`e186ecc5e`](https://togithub.com/withastro/astro/commit/e186ecc5e292de8c6a2c441a2d588512c0813068) Thanks [@johannesspohr](https://togithub.com/johannesspohr)! - Render sibling components in parallel
- [#6850](https://togithub.com/withastro/astro/pull/6850) [`c6d7ebefd`](https://togithub.com/withastro/astro/commit/c6d7ebefdd554a9ef29cfeb426ac55cab80d6473) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Content collections now support data formats including JSON and YAML. You can also create relationships, or references, between collections to pull information from one collection entry into another. Learn more on our [updated Content Collections docs](https://docs.astro.build/en/guides/content-collections/).
- [#6991](https://togithub.com/withastro/astro/pull/6991) [`719002ca5`](https://togithub.com/withastro/astro/commit/719002ca5b128744fb4316d4a52c5dcd46a42759) Thanks [@MoustaphaDev](https://togithub.com/MoustaphaDev)! - Enable experimental support for hybrid SSR with pre-rendering enabled by default
**astro.config.mjs**
```js
import { defineConfig } from 'astro/config';
export defaultdefineConfig({
output: 'hybrid',
experimental: {
hybridOutput: true,
},
})
```
Then add `export const prerender = false` to any page or endpoint you want to opt-out of pre-rendering.
**src/pages/contact.astro**
### [`v2.4.5`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#245)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.4...astro@2.4.5)
##### Patch Changes
- [#7000](https://togithub.com/withastro/astro/pull/7000) [`c87d42e76`](https://togithub.com/withastro/astro/commit/c87d42e766d02db5352671cbf074dd637bdb23e0) Thanks [@craigjennings11](https://togithub.com/craigjennings11)! - Remove 'paths' requirement for tsconfig path aliasing
- [#7055](https://togithub.com/withastro/astro/pull/7055) [`4f1073a6a`](https://togithub.com/withastro/astro/commit/4f1073a6a4f3e5a4fc9df96a2ae59f2e929703fe) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix astro:assets interfering with SSR query params ending with image extensions
### [`v2.4.4`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#244)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.3...astro@2.4.4)
##### Patch Changes
- [#7047](https://togithub.com/withastro/astro/pull/7047) [`48395c815`](https://togithub.com/withastro/astro/commit/48395c81522f7527126699c4f185f7b4488a4b9a) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix `/_image` endpoint not being prefixed with the `base` path in build SSR
- [#6916](https://togithub.com/withastro/astro/pull/6916) [`630f8c8ef`](https://togithub.com/withastro/astro/commit/630f8c8ef68fedfa393899c13a072e50145895e8) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Add fast lookups for content collection entries when using `getEntryBySlug()`. This generates a lookup map to ensure O(1) retrieval.
### [`v2.4.3`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#243)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.2...astro@2.4.3)
##### Patch Changes
- [#7034](https://togithub.com/withastro/astro/pull/7034) [`c00997033`](https://togithub.com/withastro/astro/commit/c0099703338cf81e2b381e6e754c73b442db4eab) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix `astro:assets` SSR error
- [#7032](https://togithub.com/withastro/astro/pull/7032) [`157357e1f`](https://togithub.com/withastro/astro/commit/157357e1fb6ff2c14a717230cc485fb76a3fea03) Thanks [@raulfdm](https://togithub.com/raulfdm)! - fix middleware typing export for "moduleResolution: node"
### [`v2.4.2`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#242)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.1...astro@2.4.2)
##### Patch Changes
- [#7009](https://togithub.com/withastro/astro/pull/7009) [`1d4db68e6`](https://togithub.com/withastro/astro/commit/1d4db68e64b7c3faf8863bf67f8332aa28e2f34b) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix types from `astro/client` not working properly due to `client-base.d.ts` being an non-ambient declaration file
- [#7010](https://togithub.com/withastro/astro/pull/7010) [`e9f0dd9b4`](https://togithub.com/withastro/astro/commit/e9f0dd9b473c4793c958a6c81e743fd9b02b4f64) Thanks [@ematipico](https://togithub.com/ematipico)! - Call `next()` without return anything should work, with a warning
### [`v2.4.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#241)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.0...astro@2.4.1)
##### Patch Changes
- [#6995](https://togithub.com/withastro/astro/pull/6995) [`71332cf96`](https://togithub.com/withastro/astro/commit/71332cf9697755884e5e2e63d6d2499cc2c5edd1) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Move sharpImageService and squooshImageService functions to `astro/config` so they can be imported
### [`v2.4.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#240)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.3.4...astro@2.4.0)
##### Minor Changes
- [#6990](https://togithub.com/withastro/astro/pull/6990) [`818252acd`](https://togithub.com/withastro/astro/commit/818252acda3c00499cea51ffa0f26d4c2ccd3a02) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Generated optimized images are now cached inside the `node_modules/.astro/assets` folder. The cached images will be used to avoid doing extra work and speed up subsequent builds.
- [#6659](https://togithub.com/withastro/astro/pull/6659) [`80e3d4d3d`](https://togithub.com/withastro/astro/commit/80e3d4d3d0f7719d8eae5435bba3805503057511) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Implement Inline Stylesheets RFC as experimental
- [#6771](https://togithub.com/withastro/astro/pull/6771) [`3326492b9`](https://togithub.com/withastro/astro/commit/3326492b94f76ed2b0154dd9b9a1a9eb883c1e31) Thanks [@matthewp](https://togithub.com/matthewp)! - Implements a new class-based scoping strategy
This implements the [Scoping RFC](https://togithub.com/withastro/roadmap/pull/543), providing a way to opt in to increased style specificity for Astro component styles.
This prevents bugs where global styles override Astro component styles due to CSS ordering and the use of element selectors.
To enable class-based scoping, you can set it in your config:
```js
import { defineConfig } from 'astro/config';
export default defineConfig({
scopedStyleStrategy: 'class',
});
```
Note that the 0-specificity `:where` pseudo-selector is still the default strategy. The intent is to change `'class'` to be the default in 3.0.
- [#6959](https://togithub.com/withastro/astro/pull/6959) [`cac4a321e`](https://togithub.com/withastro/astro/commit/cac4a321e814fb805eb0e3ced469e25261a50885) Thanks [@bluwy](https://togithub.com/bluwy)! - Support `` to output inline code HTML (no `pre` tag)
- [#6721](https://togithub.com/withastro/astro/pull/6721) [`831b67cdb`](https://togithub.com/withastro/astro/commit/831b67cdb8250f93f66e3b171fab024652bf80f2) Thanks [@ematipico](https://togithub.com/ematipico)! - Implements a new experimental middleware in Astro.
The middleware is available under the following experimental flag:
```js
export default defineConfig({
experimental: {
middleware: true,
},
});
```
Or via CLI, using the new argument `--experimental-middleware`.
Create a file called `middleware.{js,ts}` inside the `src` folder, and
export a `onRequest` function.
From `astro/middleware`, use the `defineMiddleware` utility to take advantage of type-safety, and use
the `sequence` utility to chain multiple middleware functions.
Example:
```ts
import { defineMiddleware, sequence } from 'astro/middleware';
const redirects = defineMiddleware((context, next) => {
if (context.request.url.endsWith('/old-url')) {
return context.redirect('/new-url');
}
return next();
});
const minify = defineMiddleware(async (context, next) => {
const repsonse = await next();
const minifiedHtml = await minifyHtml(response.text());
return new Response(minifiedHtml, {
status: 200,
headers: response.headers,
});
});
export const onRequest = sequence(redirects, minify);
```
- [#6932](https://togithub.com/withastro/astro/pull/6932) [`49514e4ce`](https://togithub.com/withastro/astro/commit/49514e4ce40fedb39bf7decd2c296258efbdafc7) Thanks [@bluwy](https://togithub.com/bluwy)! - Upgrade shiki to v0.14.1. This updates the shiki theme colors and adds the theme name to the `pre` tag, e.g. `
`.
##### Patch Changes
- [#6973](https://togithub.com/withastro/astro/pull/6973) [`0883fd487`](https://togithub.com/withastro/astro/commit/0883fd4875548a613df122f0b87a1ca8b7a7cf7d) Thanks [@matthewp](https://togithub.com/matthewp)! - Ensure multiple cookies set in dev result in multiple set-cookie headers
- Updated dependencies \[[`49514e4ce`](https://togithub.com/withastro/astro/commit/49514e4ce40fedb39bf7decd2c296258efbdafc7)]:
- [@astrojs/markdown-remark](https://togithub.com/astrojs/markdown-remark)[@2](https://togithub.com/2).2.0
### [`v2.3.4`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#234)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.3.3...astro@2.3.4)
##### Patch Changes
- [#6967](https://togithub.com/withastro/astro/pull/6967) [`a8a319aef`](https://togithub.com/withastro/astro/commit/a8a319aef744a64647ee16c7d558d74de6864c6c) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix `astro-entry` error on build with multiple JSX frameworks
- [#6961](https://togithub.com/withastro/astro/pull/6961) [`a695e44ae`](https://togithub.com/withastro/astro/commit/a695e44aed6e2f5d32cb950d4237be6e5657ba98) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix getImage type
- [#6956](https://togithub.com/withastro/astro/pull/6956) [`367e61776`](https://togithub.com/withastro/astro/commit/367e61776196a17d61c28daa4dfbabb6244e040c) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Changed where various parts of the build pipeline look to decide if a page should be prerendered. They now exclusively consider PageBuildData, allowing integrations to participate in the decision.
- [#6969](https://togithub.com/withastro/astro/pull/6969) [`77270cc2c`](https://togithub.com/withastro/astro/commit/77270cc2cd06c942d7abf1d882e36d9163edafa5) Thanks [@bluwy](https://togithub.com/bluwy)! - Avoid removing leading slash for `build.assetsPrefix` value in the build output
- [#6910](https://togithub.com/withastro/astro/pull/6910) [`895fa07d8`](https://togithub.com/withastro/astro/commit/895fa07d8b4b8359984e048daca5437e40f44390) Thanks [@natemoo-re](https://togithub.com/natemoo-re)! - Inline `process.env` boolean values (`0`, `1`, `true`, `false`) during the build. This helps with DCE and allows for better `export const prerender` detection.
- [#6958](https://togithub.com/withastro/astro/pull/6958) [`72c6bf01f`](https://togithub.com/withastro/astro/commit/72c6bf01fe49b331ca8ad9206a7506b15caf5b8d) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix content render imports flow
- [#6952](https://togithub.com/withastro/astro/pull/6952) [`e5bd084c0`](https://togithub.com/withastro/astro/commit/e5bd084c01e4f60a157969b50c05ce002f7b63d2) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Update allowed Sharp versions to support 0.32.0
### [`v2.3.3`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#233)
##### Patch Changes
- [#6940](https://togithub.com/withastro/astro/pull/6940) [`a98df9374`](https://togithub.com/withastro/astro/commit/a98df9374dec65c678fa47319cb1481b1af123e2) Thanks [@delucis](https://togithub.com/delucis)! - Support custom 404s added via `injectRoute` or as `src/pages/404.html`
- [#6948](https://togithub.com/withastro/astro/pull/6948) [`50975f2ea`](https://togithub.com/withastro/astro/commit/50975f2ea3a59f9e023cc631a9372c0c7986eec9) Thanks [@imchell](https://togithub.com/imchell)! - Placeholders for slots are cleaned in HTML String that is rendered
- [#6848](https://togithub.com/withastro/astro/pull/6848) [`ebae1eaf8`](https://togithub.com/withastro/astro/commit/ebae1eaf87f49399036033c673b513338f7d9c42) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Update `experimental.assets`'s `image.service` configuration to allow for a config option in addition to an entrypoint
- [#6953](https://togithub.com/withastro/astro/pull/6953) [`dc062f669`](https://togithub.com/withastro/astro/commit/dc062f6695ce577dc569781fc0678c903012c336) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Update `astro check` to use version 1.0.0 of the Astro language server
- Updated dependencies \[[`ac57b5549`](https://togithub.com/withastro/astro/commit/ac57b5549f828a17bdbebdaca7ace075307a3c9d)]:
- [@astrojs/telemetry](https://togithub.com/astrojs/telemetry)[@2](https://togithub.com/2).1.1
- [@astrojs/webapi](https://togithub.com/astrojs/webapi)[@2](https://togithub.com/2).1.1
### [`v2.3.2`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#232)
##### Patch Changes
- [#6920](https://togithub.com/withastro/astro/pull/6920) [`b89042553`](https://togithub.com/withastro/astro/commit/b89042553ec45d5f6bc71747e0f3470ba969e679) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix tsconfig alias baseUrl handling for "." and ".." imports
### [`v2.3.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#231)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.3.0...astro@2.3.1)
##### Patch Changes
- [#6859](https://togithub.com/withastro/astro/pull/6859) [`4c7ba4da0`](https://togithub.com/withastro/astro/commit/4c7ba4da084d7508df91cbac03c2b099a8301e2b) Thanks [@andremralves](https://togithub.com/andremralves)! - Fix Astro.params does not contain path parameter from URL with non-English characters.
- [#6872](https://togithub.com/withastro/astro/pull/6872) [`b6154d2d5`](https://togithub.com/withastro/astro/commit/b6154d2d57bfb77767a3ccf9e91c1ae4051c81bc) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix hoisted scripts path for linked package Astro components
- [#6862](https://togithub.com/withastro/astro/pull/6862) [`1f2699461`](https://togithub.com/withastro/astro/commit/1f2699461d4cdcc8007ae47ebff74ace62eee058) Thanks [@jcdogo](https://togithub.com/jcdogo)! - Fixes bug with assetsPrefix not being prepended to component-url and renderer-url in astro islands when using SSR mode.
- [#6877](https://togithub.com/withastro/astro/pull/6877) [`edabf01b4`](https://togithub.com/withastro/astro/commit/edabf01b44d8c99da160973cd0f779e0a0b93cd7) Thanks [@bluwy](https://togithub.com/bluwy)! - Upgrade to Vite 4.3
- [#6902](https://togithub.com/withastro/astro/pull/6902) [`0afff3274`](https://togithub.com/withastro/astro/commit/0afff32741247bc4c6709a30fc83787f58ec02b7) Thanks [@bluwy](https://togithub.com/bluwy)! - Disable Vite optimizer for sync and config loading. Improve first page load time for warm server startup.
### [`v2.3.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#230)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.2.3...astro@2.3.0)
##### Minor Changes
- [#6816](https://togithub.com/withastro/astro/pull/6816) [`8539eb164`](https://togithub.com/withastro/astro/commit/8539eb1643864ae7e0f5a080915cd75535f7101b) Thanks [@bluwy](https://togithub.com/bluwy)! - Support tsconfig aliases in CSS `@import`
##### Patch Changes
- [#6544](https://togithub.com/withastro/astro/pull/6544) [`a9c22994e`](https://togithub.com/withastro/astro/commit/a9c22994e41f92a586d8946988d29e3c62148778) Thanks [@wulinsheng123](https://togithub.com/wulinsheng123)! - Correctly generate directories for assets when users customise the output via rollup options.
- [#6825](https://togithub.com/withastro/astro/pull/6825) [`948a6d7be`](https://togithub.com/withastro/astro/commit/948a6d7be0c76fd1dd8550270bd29821075f799c) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix unnecessary warning when using images inside the `src/content` folder with `experimental.assets`
- Updated dependencies \[[`2511d58d5`](https://togithub.com/withastro/astro/commit/2511d58d586af080a78e5ef8a63020b3e17770db)]:
- [@astrojs/markdown-remark](https://togithub.com/astrojs/markdown-remark)[@2](https://togithub.com/2).1.4
### [`v2.2.3`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#223)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.2.2...astro@2.2.3)
##### Patch Changes
- [#6765](https://togithub.com/withastro/astro/pull/6765) [`6c09ac03b`](https://togithub.com/withastro/astro/commit/6c09ac03bf8f77ca9c1279dce570e0dcf3d439e3) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Properly include the needed WASM files for the Squoosh service for Netlify and Vercel in SSR
- [#6817](https://togithub.com/withastro/astro/pull/6817) [`f882bc163`](https://togithub.com/withastro/astro/commit/f882bc1636d5ce1c3b8faae47df36b4dc758045a) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Fix sourcemap warnings when using Content Collections and MDX with the `vite.build.sourcemap` option
- [#6819](https://togithub.com/withastro/astro/pull/6819) [`76dd53e3f`](https://togithub.com/withastro/astro/commit/76dd53e3f69d596754795710a457a1e570a3bad4) Thanks [@MoustaphaDev](https://togithub.com/MoustaphaDev)! - Fix fallback content showing unexpectedly in some cases
- [#6582](https://togithub.com/withastro/astro/pull/6582) [`7653cf9e9`](https://togithub.com/withastro/astro/commit/7653cf9e9fedc6edc6038603248351e276191c3a) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix CSS chunking and deduping between multiple Astro files and framework components
### [`v2.2.2`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#222)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.2.1...astro@2.2.2)
##### Patch Changes
- [#6811](https://togithub.com/withastro/astro/pull/6811) [`60c16db6f`](https://togithub.com/withastro/astro/commit/60c16db6ff583b0656bc1937814c8bbf06831294) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix check CLI fs load fallback behaviour
- [#6782](https://togithub.com/withastro/astro/pull/6782) [`c12ca5ece`](https://togithub.com/withastro/astro/commit/c12ca5ece34beef0fb53f911515a7c752cc2f3ad) Thanks [@amirhhashemi](https://togithub.com/amirhhashemi)! - Force error overlay direction to be LTR
### [`v2.2.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#221)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.2.0...astro@2.2.1)
##### Patch Changes
- [#6766](https://togithub.com/withastro/astro/pull/6766) [`72fed684a`](https://togithub.com/withastro/astro/commit/72fed684a35f00d80c69bcf6e8af297fed0294fe) Thanks [@Xetera](https://togithub.com/Xetera)! - Exporting the ImageFunction in astro:content and grouping it under a SchemaContext
- [#6772](https://togithub.com/withastro/astro/pull/6772) [`45bff6fcc`](https://togithub.com/withastro/astro/commit/45bff6fccb3f5c71ff24c1ceb48cd532196c90f6) Thanks [@natemoo-re](https://togithub.com/natemoo-re)! - Allow `import.meta.env` values of `0`, `1`, `true`, and `false` to be used for `export const prerender` statements
- [#6770](https://togithub.com/withastro/astro/pull/6770) [`52d7a4a01`](https://togithub.com/withastro/astro/commit/52d7a4a011a3bb722b522fffd88c5fe9a519a196) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Updated types to match newer Vite versions
- [#6774](https://togithub.com/withastro/astro/pull/6774) [`9e88e0f23`](https://togithub.com/withastro/astro/commit/9e88e0f23c5913c07f7e3e96fa0555219ef710dc) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Fix: remove old `slug()` type from `defineCollection()` helper
- [#6775](https://togithub.com/withastro/astro/pull/6775) [`fa84f1a7d`](https://togithub.com/withastro/astro/commit/fa84f1a7d2c290479c75199f16e8de489036d7ea) Thanks [@matthewp](https://togithub.com/matthewp)! - Support streaming inside of slots
- [#6779](https://togithub.com/withastro/astro/pull/6779) [`a98f6f418`](https://togithub.com/withastro/astro/commit/a98f6f418c92261a06ef79624a8c86e288c21eab) Thanks [@matthewp](https://togithub.com/matthewp)! - Prevent body head content injection in MDX when using layout
- [#6781](https://togithub.com/withastro/astro/pull/6781) [`7f74326b7`](https://togithub.com/withastro/astro/commit/7f74326b762bfc174ebe8e37ae03733563e4214f) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Fix `astro:server:setup` middlewares not applying. This resolves an issue with the Partytown integration in dev.
### [`v2.2.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#220)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.1.9...astro@2.2.0)
##### Minor Changes
- [#6703](https://togithub.com/withastro/astro/pull/6703) [`a1108e037`](https://togithub.com/withastro/astro/commit/a1108e037115cdb67d03505286c7d3a4fc2a1ff5) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Move `image()` to come from `schema` instead to fix it not working with refine and inside complex types
**Migration**:
Remove the `image` import from `astro:content`, and instead use a function to generate your schema, like such:
```ts
import { defineCollection, z } from 'astro:content';
defineCollection({
schema: ({ image }) =>
z.object({
image: image().refine((img) => img.width >= 200, {
message: 'image too small',
}),
}),
});
```
- [#6714](https://togithub.com/withastro/astro/pull/6714) [`ff0430786`](https://togithub.com/withastro/astro/commit/ff043078630e678348ae4f4757b3015b3b862c16) Thanks [@bluwy](https://togithub.com/bluwy)! - Add `build.assetsPrefix` option for CDN support. If set, all Astro-generated asset links will be prefixed with it. For example, setting it to `https://cdn.example.com` would generate `https://cdn.example.com/_astro/penguin.123456.png` links.
Also adds `import.meta.env.ASSETS_PREFIX` environment variable that can be used to manually create asset links not handled by Astro.
##### Patch Changes
- [#6753](https://togithub.com/withastro/astro/pull/6753) [`489dd8d69`](https://togithub.com/withastro/astro/commit/489dd8d69cdd9d7c243cf8bec96051a914984b9c) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix `getViteConfig` return type
- [#6744](https://togithub.com/withastro/astro/pull/6744) [`a1a4f45b5`](https://togithub.com/withastro/astro/commit/a1a4f45b51a80215fa7598da83bd0d9c5acd20d2) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix remote images in Markdown throwing errors when using `experimental.assets`
- [#6762](https://togithub.com/withastro/astro/pull/6762) [`8b88e4cf1`](https://togithub.com/withastro/astro/commit/8b88e4cf15c8bea7942b3985380164e0edf7250b) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Improved error message when an error was encountered while generating types
- [#6719](https://togithub.com/withastro/astro/pull/6719) [`d54cbe413`](https://togithub.com/withastro/astro/commit/d54cbe41349e55f8544212ad9320705f07325920) Thanks [@matthewp](https://togithub.com/matthewp)! - Better errors for when response is already sent
This adds clearer error messaging when a Response has already been sent to the browser and the developer attempts to use:
- Astro.cookies.set
- Astro.redirect
- [#6741](https://togithub.com/withastro/astro/pull/6741) [`4c347ab51`](https://togithub.com/withastro/astro/commit/4c347ab51e46f2319d614f8577fe502e3dc816e2) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix content-type header being wrong in dev on images from `astro:assets`
- [#6739](https://togithub.com/withastro/astro/pull/6739) [`2f2e572e9`](https://togithub.com/withastro/astro/commit/2f2e572e937fd25451bbc78a05d55b7caa1ca3ec) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Added more types and utilities exports related to `astro:assets` to help building custom image components and image services
- [#6759](https://togithub.com/withastro/astro/pull/6759) [`7116c021a`](https://togithub.com/withastro/astro/commit/7116c021a39eac15a6e1264dfbd11bef0f5d618a) Thanks [@bluwy](https://togithub.com/bluwy)! - Upgrade to Vite 4.2
- Updated dependencies \[[`a1a4f45b5`](https://togithub.com/withastro/astro/commit/a1a4f45b51a80215fa7598da83bd0d9c5acd20d2)]:
- [@astrojs/markdown-remark](https://togithub.com/astrojs/markdown-remark)[@2](https://togithub.com/2).1.3
### [`v2.1.9`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#219)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.1.8...astro@2.1.9)
##### Patch Changes
- [#6693](https://togithub.com/withastro/astro/pull/6693) [`c0b7864a4`](https://togithub.com/withastro/astro/commit/c0b7864a41dd9f31e5a588208d1ff806d4edf047) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Fix: avoid calling `astro:server:setup` integration hook in production
- [#6676](https://togithub.com/withastro/astro/pull/6676) [`5e33c51a9`](https://togithub.com/withastro/astro/commit/5e33c51a9c3c3b731a33f2c4a020a36d1471b78b) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Fix next and previous links for index routes when using pagination
- [#6717](https://togithub.com/withastro/astro/pull/6717) [`c2d4ae1cb`](https://togithub.com/withastro/astro/commit/c2d4ae1cbed622b2fadeb1fe8cc8bbed5f5adc8f) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Dynamically import check command to improve startup speed and prevent Astro from crashing due to language-server stuff
- [#6679](https://togithub.com/withastro/astro/pull/6679) [`08e92f4f8`](https://togithub.com/withastro/astro/commit/08e92f4f8ece50e377af5b0caca4ad789e0f23c1) Thanks [@fcFn](https://togithub.com/fcFn)! - Fix incorrect path to file in error overlay on Win
- [#6649](https://togithub.com/withastro/astro/pull/6649) [`f0b732d32`](https://togithub.com/withastro/astro/commit/f0b732d326c609208f30485b9805a84a321a870e) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Improve error handling when using `astro:assets`
- [#6710](https://togithub.com/withastro/astro/pull/6710) [`a0bdf4ce2`](https://togithub.com/withastro/astro/commit/a0bdf4ce2f36a0ce7045dc9f96c15dc7d9204c47) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix multiple Image / getImage calls with the same image causing multiple duplicate images to be generated
- [#6711](https://togithub.com/withastro/astro/pull/6711) [`c04ea0d43`](https://togithub.com/withastro/astro/commit/c04ea0d43cc2aa8ebe520a1def19dd89828cf662) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix InferGetStaticParamsType and InferGetStaticPropsType not working when getStaticPaths wasn't async
- [#6701](https://togithub.com/withastro/astro/pull/6701) [`46ecf4662`](https://togithub.com/withastro/astro/commit/46ecf466281450caedff5915cecde7a9fe3fdde0) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Remove unnecessary `.wasm` files inside build output when possible
### [`v2.1.8`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#218)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.1.7...astro@2.1.8)
##### Patch Changes
- [#6675](https://togithub.com/withastro/astro/pull/6675) [`1f783e320`](https://togithub.com/withastro/astro/commit/1f783e32075c20b13063599696644f5d47b75d8d) Thanks [@matthewp](https://togithub.com/matthewp)! - Prevent frontmatter errors from crashing the dev server
- [#6688](https://togithub.com/withastro/astro/pull/6688) [`2e92e9aa9`](https://togithub.com/withastro/astro/commit/2e92e9aa976735c3ddb647152bb9c4850136e386) Thanks [@JohannesKlauss](https://togithub.com/JohannesKlauss)! - Add a additional check for `null` on the `req.body` check in `NodeApp.render`.
- [#6578](https://togithub.com/withastro/astro/pull/6578) [`adecda7d6`](https://togithub.com/withastro/astro/commit/adecda7d6009793c5d20519a997e3b7afb08ad57) Thanks [@wulinsheng123](https://togithub.com/wulinsheng123)! - add new flag with open for dev and preview
- [#6680](https://togithub.com/withastro/astro/pull/6680) [`386336441`](https://togithub.com/withastro/astro/commit/386336441ad70017eea22db0683591126131db21) Thanks [@koriwi](https://togithub.com/koriwi)! - Invalidates cache when changing serviceEntryPoint
- [#6653](https://togithub.com/withastro/astro/pull/6653) [`7c439868a`](https://togithub.com/withastro/astro/commit/7c439868a3bc7d466418da9af669966014f3d9fe) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Simplify Markdoc configuration with a new `markdoc.config.mjs` file. This lets you import Astro components directly to render as Markdoc tags and nodes, without the need for the previous `components` property. This new configuration also unlocks passing variables to your Markdoc from the `Content` component ([see the new docs](https://docs.astro.build/en/guides/integrations-guide/markdoc/#pass-markdoc-variables)).
### [`v2.1.7`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#217)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.1.6...astro@2.1.7)
##### Patch Changes
- [#6192](https://togithub.com/withastro/astro/pull/6192) [`b7194103e`](https://togithub.com/withastro/astro/commit/b7194103e39267bf59dcd6ba00f522e424219d16) Thanks [@erg208](https://togithub.com/erg208)! - Updated to fix the Node SSR fails on POST with Express JSON middleware
- [#6630](https://togithub.com/withastro/astro/pull/6630) [`cfcf2e2ff`](https://togithub.com/withastro/astro/commit/cfcf2e2ffdaa68ace5c84329c05b83559a29d638) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Support automatic image optimization for Markdoc images when using `experimental.assets`. You can [follow our Assets guide](https://docs.astro.build/en/guides/assets/#enabling-assets-in-your-project) to enable this feature in your project. Then, start using relative or aliased image sources in your Markdoc files for automatic optimization:
```md
![The Milky Way Galaxy](../assets/galaxy.jpg)
![Houston smiling and looking cute](~/assets/houston-smiling.jpg)
```
- [#6647](https://togithub.com/withastro/astro/pull/6647) [`45da39a86`](https://togithub.com/withastro/astro/commit/45da39a8642d64eb318840b18dfc2b5ccc6561bc) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix --mode flag for builds
- [#6638](https://togithub.com/withastro/astro/pull/6638) [`7daef9a29`](https://togithub.com/withastro/astro/commit/7daef9a2993b5d457f3d243a1ebfd1dd383b3327) Thanks [@matthewp](https://togithub.com/matthewp)! - Avoid implicit head injection when a head is in the tree
### [`v2.1.6`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#216)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.1.5...astro@2.1.6)
##### Patch Changes
- [#6633](https://togithub.com/withastro/astro/pull/6633) [`9caf2a9cc`](https://togithub.com/withastro/astro/commit/9caf2a9ccc2fd59af5cb2bb7ede9399fc491d38b) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Fix failed `astro sync` call when running `astro check`. This change also reverts alias support in CSS styles.
- [#6627](https://togithub.com/withastro/astro/pull/6627) [`d338b6f74`](https://togithub.com/withastro/astro/commit/d338b6f74a3e34b494be85d24739bec9b2566faf) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Update frontmatter assets to be relative to the current file instead of `src/assets`
### [`v2.1.5`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#215)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.1.4...astro@2.1.5)
##### Patch Changes
- [#6604](https://togithub.com/withastro/astro/pull/6604) [`7f7a8504b`](https://togithub.com/withastro/astro/commit/7f7a8504b5c2df4c99d3025931860c0d50992510) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix using optimized images in Markdown not working
- [#6617](https://togithub.com/withastro/astro/pull/6617) [`38e6ec21e`](https://togithub.com/withastro/astro/commit/38e6ec21e266ad8765d8ca2293034123b34e839a) Thanks [@MoustaphaDev](https://togithub.com/MoustaphaDev)! - Fix tsconfig alias regression
- [#6588](https://togithub.com/withastro/astro/pull/6588) [`f42f47dc6`](https://togithub.com/withastro/astro/commit/f42f47dc6a91cdb6534dab0ecbf9e8e85f00ba40) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Allow access to content collection entry information (including parsed frontmatter and the entry slug) from your Markdoc using the `$entry` variable:
### [`v2.1.4`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#214)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.1.3...astro@2.1.4)
##### Patch Changes
- [#6547](https://togithub.com/withastro/astro/pull/6547) [`04dddd783`](https://togithub.com/withastro/astro/commit/04dddd783da3235aa9ed523d2856adf86b792b5f) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix images having the wrong width and height when using the new astro:assets features if both dimensions were provided
- [#6566](https://togithub.com/withastro/astro/pull/6566) [`ea9b3dd72`](https://togithub.com/withastro/astro/commit/ea9b3dd72b98b3f5a542ca24a275f673faa6c7c5) Thanks [@bluwy](https://togithub.com/bluwy)! - Support tsconfig aliases in styles
- [#6472](https://togithub.com/withastro/astro/pull/6472) [`bf024cb34`](https://togithub.com/withastro/astro/commit/bf024cb3429c5929d98378108230bc946a376b17) Thanks [@wulinsheng123](https://togithub.com/wulinsheng123)! - don't finish the action of the copy before removing all files.
- [#6556](https://togithub.com/withastro/astro/pull/6556) [`22955b895`](https://togithub.com/withastro/astro/commit/22955b895ce4343e282355db64b3a5c1415f3944) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix Invalid Input error when trying to use a custom Image Service
- [#6568](https://togithub.com/withastro/astro/pull/6568) [`f413446a8`](https://togithub.com/withastro/astro/commit/f413446a859e497395b3612e44d1540cc6b9dad7) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix image() type to be compatible with ImageMetadata
- [#6559](https://togithub.com/withastro/astro/pull/6559) [`90e5f87d0`](https://togithub.com/withastro/astro/commit/90e5f87d03215a833bb6ac91f9548670a25ce659) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Vendor `image-size` to fix CJS-related issues
- [#6576](https://togithub.com/withastro/astro/pull/6576) [`388190102`](https://togithub.com/withastro/astro/commit/3881901028cbb586f5a4de1b4953e2d6730458ab) Thanks [@bluwy](https://togithub.com/bluwy)! - Simplify internal resolver in dev
- [#6536](https://togithub.com/withastro/astro/pull/6536) [`035c0c4df`](https://togithub.com/withastro/astro/commit/035c0c4df2a623bcc2f2a1cb9e490df35fa29adc) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix Image component and `getImage` not handling images from public correctly
- [#6601](https://togithub.com/withastro/astro/pull/6601) [`f112c12b1`](https://togithub.com/withastro/astro/commit/f112c12b15dfbb278d66699f54809674dd1bded0) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix plugin apply args when filtering
- [#6586](https://togithub.com/withastro/astro/pull/6586) [`689884251`](https://togithub.com/withastro/astro/commit/68988425119255382f94c983796574050006f003) Thanks [@solelychloe](https://togithub.com/solelychloe)! - fix: Add missing --watch flag for astro check when running astro check --help
- [#6572](https://togithub.com/withastro/astro/pull/6572) [`fa132e35c`](https://togithub.com/withastro/astro/commit/fa132e35c23f2cfe368fd0a7239584a2bc5c4f12) Thanks [@MoustaphaDev](https://togithub.com/MoustaphaDev)! - Properly handle empty markdown files in content collections
- [#6555](https://togithub.com/withastro/astro/pull/6555) [`f5fddafc2`](https://togithub.com/withastro/astro/commit/f5fddafc248bb1ef57b7349bfecc25539ae2b5ea) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Add a `validateOptions` hook to the Image Service API in order to set default options and validate the passed options
- [#6605](https://togithub.com/withastro/astro/pull/6605) [`283734525`](https://togithub.com/withastro/astro/commit/28373452503bc6ca88221ffd39a5590e015e4d71) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Update tsconfig.json templates to ignore TypeScript 5.0 deprecations for the moment
- [#6583](https://togithub.com/withastro/astro/pull/6583) [`66858f1f2`](https://togithub.com/withastro/astro/commit/66858f1f238a0edf6ded2b0f693bc738785d5aa3) Thanks [@francoromanol](https://togithub.com/francoromanol)! - Fix overflow title in error message
- [#6558](https://togithub.com/withastro/astro/pull/6558) [`6c465e958`](https://togithub.com/withastro/astro/commit/6c465e958e088ff55e5b895e67c64c0dfd4277a6) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix prerendered 404 page handling in SSR
- Updated dependencies \[[`90e5f87d0`](https://togithub.com/withastro/astro/commit/90e5f87d03215a833bb6ac91f9548670a25ce659), [`f5fddafc2`](https://togithub.com/withastro/astro/commit/f5fddafc248bb1ef57b7349bfecc25539ae2b5ea)]:
- [@astrojs/markdown-remark](https://togithub.com/astrojs/markdown-remark)[@2](https://togithub.com/2).1.1
### [`v2.1.3`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#213)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.1.2...astro@2.1.3)
##### Patch Changes
- [#6530](https://togithub.com/withastro/astro/pull/6530) [`acf78c5e2`](https://togithub.com/withastro/astro/commit/acf78c5e271ec3d4f589782078e2a2044cc1c391) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix various inaccuracies with types related to the new Assets features:
- getConfiguredImageService wasn't present on the astro:assets types.
- ImageMetadata wasn't exported
- Fixed wrong module declaration for `avif`, `heic` and `heif` files.
- Add missing module declaration for SVGs imports
- [#6527](https://togithub.com/withastro/astro/pull/6527) [`04e624d06`](https://togithub.com/withastro/astro/commit/04e624d062c6ce385f6293afba26f3942c2290c6) Thanks [@bluwy](https://togithub.com/bluwy)! - Treeshake exported client components that are not imported
- [#6533](https://togithub.com/withastro/astro/pull/6533) [`cc90d7219`](https://togithub.com/withastro/astro/commit/cc90d72197e1139195e9545105b9a1d339f38e1b) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Added a warning when trying to use `experimental.assets` with a not compatible adapter
- [#6483](https://togithub.com/withastro/astro/pull/6483) [`a9a6ae298`](https://togithub.com/withastro/astro/commit/a9a6ae29812339ea00f3b9afd3de09bd9d3733a9) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix images defined in content collections schemas not working
- [#6537](https://togithub.com/withastro/astro/pull/6537) [`6a7cf0712`](https://togithub.com/withastro/astro/commit/6a7cf0712da23e2c095f4bc4f2512e618bceb38e) Thanks [@matthewp](https://togithub.com/matthewp)! - Prevent astro:content from depending on Node builtins
- [#6488](https://togithub.com/withastro/astro/pull/6488) [`bfd67ea74`](https://togithub.com/withastro/astro/commit/bfd67ea749dbc6ffa7c9a671fcc48bea6c04a075) Thanks [@matthewp](https://togithub.com/matthewp)! - Remove use of createRequire breaking non-Node hosts.
- [#6503](https://togithub.com/withastro/astro/pull/6503) [`f6eddffa0`](https://togithub.com/withastro/astro/commit/f6eddffa0414d54767e9f9e1ee5a936b8a20146b) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Add caching to `getCollection()` queries for faster SSG production builds
- [#6508](https://togithub.com/withastro/astro/pull/6508) [`c63874090`](https://togithub.com/withastro/astro/commit/c6387409062f1d7c2afc93319748ad57086837c5) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Improve content collection error formatting:
- Bold the collection and entry that failed
- Consistently list the frontmatter key at the start of every error
- Rich errors for union types
- [#6485](https://togithub.com/withastro/astro/pull/6485) [`d637d1ea5`](https://togithub.com/withastro/astro/commit/d637d1ea5b347b9c724adc895c9006c696ac8fc8) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix `@astrojs/prism` edgecase with strict package managers
- [#6532](https://togithub.com/withastro/astro/pull/6532) [`637f9bc72`](https://togithub.com/withastro/astro/commit/637f9bc728ea7d56fc82a862d761385f0dcd9528) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix `env.d.ts` changing types wrongly on every restart when `experimental.assets` is enabled
- [#6460](https://togithub.com/withastro/astro/pull/6460) [`77a046e88`](https://togithub.com/withastro/astro/commit/77a046e886c370b737208574b6934f5a1cf2b177) Thanks [@bluwy](https://togithub.com/bluwy)! - Add default `.npmrc` file when adding the Lit integration through `astro add lit` and using `pnpm`.
### [`v2.1.2`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#212)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.1.1...astro@2.1.2)
##### Patch Changes
- [#6466](https://togithub.com/withastro/astro/pull/6466) [`ec0455352`](https://togithub.com/withastro/astro/commit/ec0455352568ab3ea3c5ec1625f582aa54d15bb7) Thanks [@matthewp](https://togithub.com/matthewp)! - In dev, load assets relative to the root
### [`v2.1.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#211)
[Compare Source](https://togithub.com/withastro/astro/compare/astro@2.1.0...astro@2.1.1)
##### Patch Changes
- [#6454](https://togithub.com/withastro/astro/pull/6454) [`05fc7ae54`](https://togithub.com/withastro/astro/commit/05fc7ae54c19442730971ea22d38f5dbc88050e5) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Add support for ESM importing SVGs when using `astro:assets`
- [#6455](https://togithub.com/withastro/astro/pull/6455) [`cf0198316`](https://togithub.com/withastro/astro/commit/cf0198316db91a5df6750401ea3cbd7ce5330836) Thanks [@delucis](https://togithub.com/delucis)! - Document `image.service` configuration option
- [#6459](https://togithub.com/withastro/astro/pull/6459) [`964d55246`](https://togithub.com/withastro/astro/commit/964d55246b73410b1e09b5716914f709a97cb387) Thanks [@bluwy](https://togithub.com/bluwy)! - Prevent HTML-escape of raw strings in ` Githubissues.
Githubissues is a development platform for aggregating issues.
This PR contains the following updates:
2.0.15
->2.5.6
Release Notes
withastro/astro
### [`v2.5.6`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#256) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.5...astro@2.5.6) ##### Patch Changes - [#7193](https://togithub.com/withastro/astro/pull/7193) [`8b041bf57`](https://togithub.com/withastro/astro/commit/8b041bf57c76830c4070330270521e05d8e58474) Thanks [@ematipico](https://togithub.com/ematipico)! - Refactor how pages are emitted during the internal bundling. Now each page is emitted as a separate entry point. - [#7218](https://togithub.com/withastro/astro/pull/7218) [`6c7df28ab`](https://togithub.com/withastro/astro/commit/6c7df28ab34b756b8426443bf6976e24d4611a62) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix CSS deduping and missing chunks - [#7235](https://togithub.com/withastro/astro/pull/7235) [`ee2aca80a`](https://togithub.com/withastro/astro/commit/ee2aca80a71afe843af943b11966fcf77f556cfb) Thanks [@MoustaphaDev](https://togithub.com/MoustaphaDev)! - Prioritize dynamic prerendered routes over dynamic server routes - [#7192](https://togithub.com/withastro/astro/pull/7192) [`7851f9258`](https://togithub.com/withastro/astro/commit/7851f9258fae2f54795470253df9ce4bcd5f9cb0) Thanks [@ematipico](https://togithub.com/ematipico)! - Detect `mdx` files using their full extension - [#7244](https://togithub.com/withastro/astro/pull/7244) [`bef3a75db`](https://togithub.com/withastro/astro/commit/bef3a75dbc48d584daff9f7f3d5a8937b0356170) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Remove the auto-generated `$entry` variable for Markdoc entries. To access frontmatter as a variable, you can pass `entry.data` as a prop where you render your content: ### [`v2.5.5`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#255) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.4...astro@2.5.5) ##### Patch Changes - [#6832](https://togithub.com/withastro/astro/pull/6832) [`904131aec`](https://togithub.com/withastro/astro/commit/904131aec3bacb2824ad60457a45772eba27b5ab) Thanks [@wulinsheng123](https://togithub.com/wulinsheng123)! - fix a bug when Fragment is as a slot - [#7178](https://togithub.com/withastro/astro/pull/7178) [`57e65d247`](https://togithub.com/withastro/astro/commit/57e65d247f67de61bcc3a585c2254feb61ed2e74) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Fix: revert Markdoc asset bleed changes. Production build issues were discovered that deserve a different fix. ### [`v2.5.4`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#254) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.3...astro@2.5.4) ##### Patch Changes - [#7125](https://togithub.com/withastro/astro/pull/7125) [`4ce8bf7c6`](https://togithub.com/withastro/astro/commit/4ce8bf7c62d2b19ff7bd3dd0fbad88fcac10feaa) Thanks [@bluwy](https://togithub.com/bluwy)! - Make vite-plugin-content-virtual-mod run `getEntrySlug` 10 at a time to prevent `EMFILE: too many open files` error - [#7166](https://togithub.com/withastro/astro/pull/7166) [`626dd41d0`](https://togithub.com/withastro/astro/commit/626dd41d0a80155f59962e3a1b70d8dfd2719d25) Thanks [@ematipico](https://togithub.com/ematipico)! - Move generation of renderers code into their own file - [#7174](https://togithub.com/withastro/astro/pull/7174) [`92d1f017e`](https://togithub.com/withastro/astro/commit/92d1f017e5c0a921973e028b90c7975e74dce433) Thanks [@ematipico](https://togithub.com/ematipico)! - Remove restriction around serialisable data for `Astro.locals` - [#7172](https://togithub.com/withastro/astro/pull/7172) [`2ca94269e`](https://togithub.com/withastro/astro/commit/2ca94269ed0b5046033c47985ef50b7e7a637caf) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Add types for `import.meta.env.ASSETS_PREFIX` and `import.meta.env.SITE` - [#7134](https://togithub.com/withastro/astro/pull/7134) [`5b6a0312a`](https://togithub.com/withastro/astro/commit/5b6a0312a822565404a6334576677fc574cfcd56) Thanks [@alexvuka1](https://togithub.com/alexvuka1)! - value of var can be undefined when using `define:vars` - [#7171](https://togithub.com/withastro/astro/pull/7171) [`79ba74832`](https://togithub.com/withastro/astro/commit/79ba74832fc46e6946c8235c33e9acfbb3a4139b) Thanks [@bluwy](https://togithub.com/bluwy)! - Prevent Vite watching on Astro config load ### [`v2.5.3`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#253) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.2...astro@2.5.3) ##### Patch Changes - [#6758](https://togithub.com/withastro/astro/pull/6758) [`f558a9e20`](https://togithub.com/withastro/astro/commit/f558a9e2056fc8f2e2d5814e74f199e398159fc4) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Improve style and script handling across content collection files. This addresses style bleed present in `@astrojs/markdoc` v0.1.0 - [#7143](https://togithub.com/withastro/astro/pull/7143) [`b41963b77`](https://togithub.com/withastro/astro/commit/b41963b775149b802eea9e12c5fe266bb9a02944) Thanks [@johannesspohr](https://togithub.com/johannesspohr)! - Render 404 page content when a `Response` with status 404 is returned from a page ### [`v2.5.2`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#252) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.1...astro@2.5.2) ##### Patch Changes - [#7144](https://togithub.com/withastro/astro/pull/7144) [`ba0636240`](https://togithub.com/withastro/astro/commit/ba0636240996f9f082d122a8414240196881cb96) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Fixed an issue where scripts that weren't safe to inline were inlined. - [#7150](https://togithub.com/withastro/astro/pull/7150) [`8f418d13c`](https://togithub.com/withastro/astro/commit/8f418d13c5d5c9c40f05020205f24380b718654b) Thanks [@MoustaphaDev](https://togithub.com/MoustaphaDev)! - fix no matched path when using `getStaticPaths` without `prerender` export. ### [`v2.5.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#251) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.5.0...astro@2.5.1) ##### Patch Changes - [#7128](https://togithub.com/withastro/astro/pull/7128) [`72f686a68`](https://togithub.com/withastro/astro/commit/72f686a68930de52f9a274c13c98acad59925b31) Thanks [@johannesspohr](https://togithub.com/johannesspohr)! - Fix routes created by `injectRoute` for SSR - [#7132](https://togithub.com/withastro/astro/pull/7132) [`319a0a7a0`](https://togithub.com/withastro/astro/commit/319a0a7a0a6a950387c942b467746d590bb32fda) Thanks [@ematipico](https://togithub.com/ematipico)! - Emit middleware as an entrypoint during build - [#7036](https://togithub.com/withastro/astro/pull/7036) [`852d59a8d`](https://togithub.com/withastro/astro/commit/852d59a8d68e124f10852609e0f1619d5838ac76) Thanks [@ematipico](https://togithub.com/ematipico)! - Emit pages as dynamic import chunks during the build - [#7126](https://togithub.com/withastro/astro/pull/7126) [`530fb9ebe`](https://togithub.com/withastro/astro/commit/530fb9ebee77646921ec29d45d9b66484bdfb521) Thanks [@bluwy](https://togithub.com/bluwy)! - Add route information when warning of `getStaticPaths()` ignored - [#7118](https://togithub.com/withastro/astro/pull/7118) [`3257dd289`](https://togithub.com/withastro/astro/commit/3257dd28901c785a6a661211b98c5ef2cb3b9aa4) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix unnecessary warning showing on start when a collection folder was empty. The warning was also enhanced to add more information about possible causes. ### [`v2.5.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#250) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.5...astro@2.5.0) ##### Minor Changes - [#7071](https://togithub.com/withastro/astro/pull/7071) [`e186ecc5e`](https://togithub.com/withastro/astro/commit/e186ecc5e292de8c6a2c441a2d588512c0813068) Thanks [@johannesspohr](https://togithub.com/johannesspohr)! - Render sibling components in parallel - [#6850](https://togithub.com/withastro/astro/pull/6850) [`c6d7ebefd`](https://togithub.com/withastro/astro/commit/c6d7ebefdd554a9ef29cfeb426ac55cab80d6473) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Content collections now support data formats including JSON and YAML. You can also create relationships, or references, between collections to pull information from one collection entry into another. Learn more on our [updated Content Collections docs](https://docs.astro.build/en/guides/content-collections/). - [#6991](https://togithub.com/withastro/astro/pull/6991) [`719002ca5`](https://togithub.com/withastro/astro/commit/719002ca5b128744fb4316d4a52c5dcd46a42759) Thanks [@MoustaphaDev](https://togithub.com/MoustaphaDev)! - Enable experimental support for hybrid SSR with pre-rendering enabled by default **astro.config.mjs** ```js import { defineConfig } from 'astro/config'; export defaultdefineConfig({ output: 'hybrid', experimental: { hybridOutput: true, }, }) ``` Then add `export const prerender = false` to any page or endpoint you want to opt-out of pre-rendering. **src/pages/contact.astro** ### [`v2.4.5`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#245) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.4...astro@2.4.5) ##### Patch Changes - [#7000](https://togithub.com/withastro/astro/pull/7000) [`c87d42e76`](https://togithub.com/withastro/astro/commit/c87d42e766d02db5352671cbf074dd637bdb23e0) Thanks [@craigjennings11](https://togithub.com/craigjennings11)! - Remove 'paths' requirement for tsconfig path aliasing - [#7055](https://togithub.com/withastro/astro/pull/7055) [`4f1073a6a`](https://togithub.com/withastro/astro/commit/4f1073a6a4f3e5a4fc9df96a2ae59f2e929703fe) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix astro:assets interfering with SSR query params ending with image extensions ### [`v2.4.4`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#244) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.3...astro@2.4.4) ##### Patch Changes - [#7047](https://togithub.com/withastro/astro/pull/7047) [`48395c815`](https://togithub.com/withastro/astro/commit/48395c81522f7527126699c4f185f7b4488a4b9a) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix `/_image` endpoint not being prefixed with the `base` path in build SSR - [#6916](https://togithub.com/withastro/astro/pull/6916) [`630f8c8ef`](https://togithub.com/withastro/astro/commit/630f8c8ef68fedfa393899c13a072e50145895e8) Thanks [@bholmesdev](https://togithub.com/bholmesdev)! - Add fast lookups for content collection entries when using `getEntryBySlug()`. This generates a lookup map to ensure O(1) retrieval. ### [`v2.4.3`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#243) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.2...astro@2.4.3) ##### Patch Changes - [#7034](https://togithub.com/withastro/astro/pull/7034) [`c00997033`](https://togithub.com/withastro/astro/commit/c0099703338cf81e2b381e6e754c73b442db4eab) Thanks [@bluwy](https://togithub.com/bluwy)! - Fix `astro:assets` SSR error - [#7032](https://togithub.com/withastro/astro/pull/7032) [`157357e1f`](https://togithub.com/withastro/astro/commit/157357e1fb6ff2c14a717230cc485fb76a3fea03) Thanks [@raulfdm](https://togithub.com/raulfdm)! - fix middleware typing export for "moduleResolution: node" ### [`v2.4.2`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#242) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.1...astro@2.4.2) ##### Patch Changes - [#7009](https://togithub.com/withastro/astro/pull/7009) [`1d4db68e6`](https://togithub.com/withastro/astro/commit/1d4db68e64b7c3faf8863bf67f8332aa28e2f34b) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Fix types from `astro/client` not working properly due to `client-base.d.ts` being an non-ambient declaration file - [#7010](https://togithub.com/withastro/astro/pull/7010) [`e9f0dd9b4`](https://togithub.com/withastro/astro/commit/e9f0dd9b473c4793c958a6c81e743fd9b02b4f64) Thanks [@ematipico](https://togithub.com/ematipico)! - Call `next()` without return anything should work, with a warning ### [`v2.4.1`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#241) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.4.0...astro@2.4.1) ##### Patch Changes - [#6995](https://togithub.com/withastro/astro/pull/6995) [`71332cf96`](https://togithub.com/withastro/astro/commit/71332cf9697755884e5e2e63d6d2499cc2c5edd1) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Move sharpImageService and squooshImageService functions to `astro/config` so they can be imported ### [`v2.4.0`](https://togithub.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#240) [Compare Source](https://togithub.com/withastro/astro/compare/astro@2.3.4...astro@2.4.0) ##### Minor Changes - [#6990](https://togithub.com/withastro/astro/pull/6990) [`818252acd`](https://togithub.com/withastro/astro/commit/818252acda3c00499cea51ffa0f26d4c2ccd3a02) Thanks [@Princesseuh](https://togithub.com/Princesseuh)! - Generated optimized images are now cached inside the `node_modules/.astro/assets` folder. The cached images will be used to avoid doing extra work and speed up subsequent builds. - [#6659](https://togithub.com/withastro/astro/pull/6659) [`80e3d4d3d`](https://togithub.com/withastro/astro/commit/80e3d4d3d0f7719d8eae5435bba3805503057511) Thanks [@lilnasy](https://togithub.com/lilnasy)! - Implement Inline Stylesheets RFC as experimental - [#6771](https://togithub.com/withastro/astro/pull/6771) [`3326492b9`](https://togithub.com/withastro/astro/commit/3326492b94f76ed2b0154dd9b9a1a9eb883c1e31) Thanks [@matthewp](https://togithub.com/matthewp)! - Implements a new class-based scoping strategy This implements the [Scoping RFC](https://togithub.com/withastro/roadmap/pull/543), providing a way to opt in to increased style specificity for Astro component styles. This prevents bugs where global styles override Astro component styles due to CSS ordering and the use of element selectors. To enable class-based scoping, you can set it in your config: ```js import { defineConfig } from 'astro/config'; export default defineConfig({ scopedStyleStrategy: 'class', }); ``` Note that the 0-specificity `:where` pseudo-selector is still the default strategy. The intent is to change `'class'` to be the default in 3.0. - [#6959](https://togithub.com/withastro/astro/pull/6959) [`cac4a321e`](https://togithub.com/withastro/astro/commit/cac4a321e814fb805eb0e3ced469e25261a50885) Thanks [@bluwy](https://togithub.com/bluwy)! - Support `` to output inline code HTML (no `pre` tag) - [#6721](https://togithub.com/withastro/astro/pull/6721) [`831b67cdb`](https://togithub.com/withastro/astro/commit/831b67cdb8250f93f66e3b171fab024652bf80f2) Thanks [@ematipico](https://togithub.com/ematipico)! - Implements a new experimental middleware in Astro. The middleware is available under the following experimental flag: ```js export default defineConfig({ experimental: { middleware: true, }, }); ``` Or via CLI, using the new argument `--experimental-middleware`. Create a file called `middleware.{js,ts}` inside the `src` folder, and export a `onRequest` function. From `astro/middleware`, use the `defineMiddleware` utility to take advantage of type-safety, and use the `sequence` utility to chain multiple middleware functions. Example: ```ts import { defineMiddleware, sequence } from 'astro/middleware'; const redirects = defineMiddleware((context, next) => { if (context.request.url.endsWith('/old-url')) { return context.redirect('/new-url'); } return next(); }); const minify = defineMiddleware(async (context, next) => { const repsonse = await next(); const minifiedHtml = await minifyHtml(response.text()); return new Response(minifiedHtml, { status: 200, headers: response.headers, }); }); export const onRequest = sequence(redirects, minify); ``` - [#6932](https://togithub.com/withastro/astro/pull/6932) [`49514e4ce`](https://togithub.com/withastro/astro/commit/49514e4ce40fedb39bf7decd2c296258efbdafc7) Thanks [@bluwy](https://togithub.com/bluwy)! - Upgrade shiki to v0.14.1. This updates the shiki theme colors and adds the theme name to the `pre` tag, e.g. `