fix: undefined remarkPluginFrontmatter after calling render method (#5927)
* Update vite-plugin-content-assets.ts * Add changeset for #5927 Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Anders Kaseorg <andersk@mit.edu> Co-authored-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
1c7eef308e
commit
322e059d0d
2 changed files with 6 additions and 1 deletions
5
.changeset/lazy-buttons-prove.md
Normal file
5
.changeset/lazy-buttons-prove.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix undefined `remarkPluginFrontmatter` after calling `render` method
|
|
@ -34,7 +34,7 @@ export function astroDelayedAssetPlugin({ mode }: { mode: string }): Plugin {
|
||||||
if (isDelayedAsset(id)) {
|
if (isDelayedAsset(id)) {
|
||||||
const basePath = id.split('?')[0];
|
const basePath = id.split('?')[0];
|
||||||
const code = `
|
const code = `
|
||||||
export { Content, getHeadings } from ${JSON.stringify(basePath)};
|
export { Content, getHeadings, frontmatter } from ${JSON.stringify(basePath)};
|
||||||
export const collectedLinks = ${JSON.stringify(LINKS_PLACEHOLDER)};
|
export const collectedLinks = ${JSON.stringify(LINKS_PLACEHOLDER)};
|
||||||
export const collectedStyles = ${JSON.stringify(STYLES_PLACEHOLDER)};
|
export const collectedStyles = ${JSON.stringify(STYLES_PLACEHOLDER)};
|
||||||
`;
|
`;
|
||||||
|
|
Loading…
Add table
Reference in a new issue