Skip to content

Releases: egoist/vite-plugin-compile-time

v0.4.0

22 Dec 17:51
Compare
Choose a tag to compare

New API:

import fs from "fs"

const post = compileTime(async () => {
  const post = await fs.promises.readFile("./post.md", "utf8")
  return {
    data: { post },
  }
})

assert.equal(post, "...the content of the post...")

Just use the magic compileTime function.