mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-09-12 03:31:37 +08:00
10 lines
366 B
TypeScript
10 lines
366 B
TypeScript
import { createRequire } from 'node:module';
|
|
|
|
/**
|
|
* CJS `require()` in an ESM context, shared by the whole CLI so that
|
|
* `allowTs`'s `.ts` loader also applies to `loadUserConfig` requires.
|
|
* Bound to the package `src/` directory, so paths like `../package.json`
|
|
* resolve to the package root as before.
|
|
*/
|
|
export const require = createRequire(import.meta.url);
|