From d8af02a9443de5fa4cfe8e3ef7beddde9ef8cf09 Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Tue, 12 Jul 2022 14:28:14 -0400 Subject: [PATCH] fix: add github-slugger to ALWAYS_EXTERNAL (#3902) * fix: add github-slugger to ALWAYS_EXTERNAL * chore: changeset --- .changeset/giant-bugs-battle.md | 5 +++++ packages/astro/src/core/create-vite.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/giant-bugs-battle.md 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',