Get exports of an local npm package.
npm i pkg-exports
getExportsRuntimeGet the exports by evaluate the module in worker thread.
import { getExportsRuntime } from 'pkg-exports'
const exports = await getExportsRuntime('vue')
console.log(exports) // ['ref', 'computed', ...]
getExportsStaticGet the exports by static analysis (only work with ESM). Experimental.
import { getExportsStatic } from 'pkg-exports'
const exports = await getExportsStatic('vue')
console.log(exports) // ['ref', 'computed', ...]
MIT License © 2022 Anthony Fu
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.