This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { PluginOption } from "vite"; | |
import { render } from 'ejs'; | |
import path from 'path'; | |
import fs from 'fs'; | |
type ReadFile = [string, object]; | |
const readFile = async (...args: ReadFile) => { | |
const [path, options] = args; | |
return new Promise((resolve, reject) => { | |
fs.readFile(path, options, (err, data) => { |