refactor: rename shared package to core (#24309)
This commit is contained in:
parent
37aa8442dc
commit
62ef2a2207
166 changed files with 218 additions and 218 deletions
10
packages/core/src/util/module.ts
Normal file
10
packages/core/src/util/module.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { createRequire } from "node:module"
|
||||
import path from "node:path"
|
||||
|
||||
export namespace Module {
|
||||
export function resolve(id: string, dir: string) {
|
||||
try {
|
||||
return createRequire(path.join(dir, "package.json")).resolve(id)
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue