Repository navigation
Improve Sätteri import comment - #3948
Conversation
|
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
delucis
left a comment
There was a problem hiding this comment.
Appreciate the investigation — would be nice to fix properly in Astro as I guess this could bite users and the error message is fairly cryptic. But more than happy that we understand this and document it properly — thank you!
* main: Fix Markdown processing path matching (withastro#3953) Improve Sätteri import comment (withastro#3948) i18n(de): bring outdated pages up to date (withastro#3949)

Description
Follow-up to #3923 (comment), this PR improves the comment describing how we import the Sätteri integration to workaround an Astro limitation.
The comment should be clear enough to explain the issue and the workaround. Regarding a potential fix in Astro for the underlying issue, I would definitelly need to think more about it. So far, the only idea I had is to have the Vite module runner used for loading the config to stay open instead of closing immediately, and return some kind of disposable. The disposable would be used to properly close it only when needed, e.g. after a build or when the dev server is closed, when the dev server is restarted, after a sync, etc. The
getViteConfig()case would also need to be handled. On top of the extra cost of keeping the module runner open, it's also a lot of orchestration to pass around such disposable with the current architecture.A workaround that I only briefly tested for fun is to by-pass Vite and rely on a native dynamic import to load
@astrojs/markdown-satteri, e.g. using() => new Function('return import("@astrojs/markdown-satteri")')but that's definitely not something we want to do (even tho it seems to work) 😅