| description | Modern alternatives to the resolve package |
|---|
import.meta.resolve is built into browsers and Node.js (>= 20).
Example:
const path = import.meta.resolve('my-module')import { resolveModulePath } from 'exsolve'
const path = resolveModulePath('my-module')import { ResolverFactory } from 'oxc-resolver'
const resolver = new ResolverFactory()
const { path } = resolver.sync(process.cwd(), 'my-module')