0.1.1 • Published 1 year ago

@natsuneko-laboratory/honox-mdx-island v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@natsuneko-laboratory/honox-mdx-island

Support for MDX with Island in HonoX.

Installation

$ npm install @natsuneko-laboratory/honox-mdx-island

Usage

// vite.config.ts
import build from "@hono/vite-build/cloudflare-pages";
import adapter from "@hono/vite-dev-server/cloudflare";
import { mdx } from "@natsuneko-laboratory/honox-mdx-island";
import honox from "honox/vite";
import { defineConfig } from "vite";

// remark plugins
import remarkFrontmatter from "remark-frontmatter";
import remarkMdxFrontmatter from "remark-mdx-frontmatter";

export default defineConfig({
  plugins: [
    mdx({
      jsxImportSource: "hono/jsx",
      remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter],
    }),
    honox({ devServer: { adapter } }),
    build(),
  ],
});

License

MIT

0.1.1

1 year ago

0.1.0

1 year ago