diff --git a/.changeset/many-terms-do.md b/.changeset/many-terms-do.md new file mode 100644 index 000000000000..ba852e6ee8db --- /dev/null +++ b/.changeset/many-terms-do.md @@ -0,0 +1,5 @@ +--- +'@astrojs/markdown-remark': patch +--- + +Add back missing ssr-utils.js file diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index 521f96870231..09c5b22e149b 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -13,7 +13,8 @@ "homepage": "https://astro.build", "main": "./dist/index.js", "exports": { - ".": "./dist/index.js" + ".": "./dist/index.js", + "./ssr-utils": "./dist/ssr-utils.js" }, "scripts": { "prepublish": "pnpm build", diff --git a/packages/markdown/remark/src/ssr-utils.ts b/packages/markdown/remark/src/ssr-utils.ts new file mode 100644 index 000000000000..4f099307fb0c --- /dev/null +++ b/packages/markdown/remark/src/ssr-utils.ts @@ -0,0 +1,8 @@ +/** Utilities used in deployment-ready SSR bundles */ +import Slugger from 'github-slugger'; + +const slugger = new Slugger(); +/** @see {@link "/packages/astro/vite-plugin-markdown"} */ +export function slug(value: string): string { + return slugger.slug(value); +} \ No newline at end of file