0.0.3 • Published 8 months ago

@idealeap/gwt v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

🎨 技术栈

  • Openai
  • Jest
  • Typescript
  • Vitepress
  • Eslint
  • Prettier
  • MarkdownLint
  • Github Actions
  • Vercel Ncc
  • Milvus

Misc

发包时由于使用 ES module,Node.js 内置的 filename 与dirname 就变得不可用了,需要使用 url 模块的 fileURLToPath 方法将 import.meta.url 转换为文件路径,然后再使用 path 模块的 dirname 方法获取文件所在目录的路径。

import { fileURLToPath } from "url";
import path from "path";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

📄 作者

(C) 2023 Marlene, Idealeap