Update @astrojs/mdx to v3
Description
- Updates the version of
@astrojs/mdxbundled with Starlight to the new v3 release, which comes with several performance improvements - Enables the
optimizeoption to MDX for even faster builds. - Also updates the peer dependency version of Astro, which is now ^4.8.0
- Taking the Starlight docs as a benchmark, it looks like builds are roughly 40% faster for us. Will be curious to see how things improves for other people!
Some other small changes I needed to make:
- ~~Updated Vitest to 1.4.0 β there were some compatibility issues with the upgraded Vite and the older Vitest version we were using. (Did not update to latest Vitest as that was also causing another issue we can investigate later.)~~ Superseded by #1861
- Fixed a type issue due to a content collection types change β based on HiDeooβs change here: https://github.com/withastro/starlight/pull/1841/files/c193d55f0046553772bfa540f15d956290f258e4#r1593616510
- ~~Ignored some more
.d.tsfiles being generated during tests~~ Turned out that was only happening with Vitest 1.6.0 β reverted.
The latest updates on your projects. Learn more about Vercel for Git βοΈ
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| starlight | β Ready (Inspect) | Visit Preview | May 17, 2024 2:39pm |
1 Ignored Deployment
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| starlight-i18n | β¬οΈ Ignored (Inspect) | May 17, 2024 2:39pm |
π¦ Changeset detected
Latest commit: 6fe71de5795d4301133e75af6f3bb4e108be1b85
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @astrojs/starlight | Minor |
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
size-limit report π¦
| Path | Size |
|---|---|
| /index.html | 5.26 KB (-13.94% π½) |
| /_astro/*.js | 21.81 KB (-0.92% π½) |
| /_astro/*.css | 13.46 KB (0%) |
Given Astro 4.8 seems to break script hoisting MDX and this forces an upgrade to 4.8, we might need to hold off merging this until https://github.com/withastro/astro/issues/11063 is fixed?
I've sent https://github.com/withastro/astro/pull/11084 that fixes it.
Thank you for the quick fix @bluwy! π