diff options
author | 2025-06-05 14:25:23 +0000 | |
---|---|---|
committer | 2025-06-05 14:25:23 +0000 | |
commit | e586d7d704d475afe3373a1de6ae20d504f79d6d (patch) | |
tree | 7e3fa24807cebd48a86bd40f866d792181191ee9 /packages/markdown/remark/src/import-plugin-browser.ts | |
download | astro-latest.tar.gz astro-latest.tar.zst astro-latest.zip |
Sync from a8e1c0a7402940e0fc5beef669522b315052df1blatest
Diffstat (limited to 'packages/markdown/remark/src/import-plugin-browser.ts')
-rw-r--r-- | packages/markdown/remark/src/import-plugin-browser.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/markdown/remark/src/import-plugin-browser.ts b/packages/markdown/remark/src/import-plugin-browser.ts new file mode 100644 index 000000000..5fb90ad0b --- /dev/null +++ b/packages/markdown/remark/src/import-plugin-browser.ts @@ -0,0 +1,8 @@ +// This file should be imported as `#import-plugin` +import type * as unified from 'unified'; + +// In the browser, we can try to do a plain import +export async function importPlugin(p: string): Promise<unified.Plugin> { + const importResult = await import(p); + return importResult.default; +} |