Replace Elysia with bun.serve for hot reloading and static serving

This commit is contained in:
2025-10-22 19:56:38 -07:00
parent b136c6e63a
commit cd88f570a0
13 changed files with 522 additions and 27 deletions

View File

@@ -0,0 +1,19 @@
import type {BunPlugin} from 'bun';
import { marked } from 'marked';
const markdownLoader: BunPlugin = {
name: 'markdown-loader',
setup(build) {
// Plugin implementation
build.onLoad({filter: /\.md$/}, async args => {
const text = await Bun.file(args.path).text();
const html = marked.parse(text);
return {
contents: `export default ${html};`,
loader: 'html',
};
});
},
};
export default markdownLoader;