Appearance
import-meta-resolve 的 CJS 版本,可供不支持 ESM 的项目使用。
CJS
ESM
novlan1
安装
pnpm add @plugin-light/import-meta-resolve -D
使用
import { resolve } from '@plugin-light/import-meta-resolve'; console.log(resolve('./index.js', import.meta.url))
点此查看