in packages/web-scripts/src/Tasks/BuildTask.ts [89:106]
async function buildESM(task: BuildTaskDesc): Promise<string> {
const cmd = 'npx';
const args = [
'tsc',
'--declaration',
'false',
'--allowJs',
'--outDir',
'esm',
'--noEmit',
'false',
'--module',
'ES2015',
...task.restOptions,
];
const stdout = await spawn(cmd, args, { stdio: 'inherit' });
return (stdout || '').toString();
}