Merge pull request #28308 from backstage/rugvip/modules
cli: add support for native ESM in Node.js packages
This commit is contained in:
@@ -183,9 +183,8 @@ async function compileTsSchemas(
|
||||
|
||||
// Lazy loaded, because this brings up all of TypeScript and we don't
|
||||
// want that eagerly loaded in tests
|
||||
const { getProgramFromFiles, buildGenerator } = await import(
|
||||
'typescript-json-schema'
|
||||
);
|
||||
const { getProgramFromFiles, buildGenerator } =
|
||||
require('typescript-json-schema') as typeof import('typescript-json-schema');
|
||||
|
||||
const program = getProgramFromFiles(
|
||||
entries.map(({ path }) => path),
|
||||
|
||||
Reference in New Issue
Block a user