diff --git a/.changeset/giant-bugs-battle.md b/.changeset/giant-bugs-battle.md new file mode 100644 index 000000000..89d0a605b --- /dev/null +++ b/.changeset/giant-bugs-battle.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix: markdown "require is not defined" issue diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index a70ff3ede..07d73733f 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -21,6 +21,8 @@ const ALWAYS_EXTERNAL = new Set([ '@sveltejs/vite-plugin-svelte', 'micromark-util-events-to-acorn', '@astrojs/markdown-remark', + // in-lined for markdown modules + 'github-slugger', 'node-fetch', 'prismjs', 'shiki',