build: move to esm (wip)

This commit is contained in:
Justineo
2024-04-16 13:02:13 +08:00
parent 002b2f2701
commit d00aa090a6
5 changed files with 25 additions and 19 deletions

View File

@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import path from "node:path";
import fs from "node:fs";
import { resolvePath } from "./utils.js";
const packageFile = path.resolve(__dirname, "../package.json");
const packageFile = resolvePath(import.meta.url, "../package.json");
const typesPaths = {
3: "dist/index.d.ts",