async function buildCJS()

in packages/web-scripts/src/Tasks/BuildTask.ts [70:87]


async function buildCJS(task: BuildTaskDesc): Promise<string> {
  const cmd = 'npx';
  const args = [
    'tsc',
    '--declaration',
    'false',
    '--allowJs',
    '--outDir',
    'cjs',
    '--noEmit',
    'false',
    '--module',
    'CommonJS',
    ...task.restOptions,
  ];
  const stdout = await spawn(cmd, args, { stdio: 'inherit' });
  return (stdout || '').toString();
}