ts / scripts / build-stubs.mjs
45 words
1
2
3
4
5
6
// Marks each dist tree with its module format so Node resolves both from one
// package: dist/esm is ESM, dist/cjs is CommonJS.
import { writeFile } from 'node:fs/promises';

await writeFile('dist/esm/package.json', JSON.stringify({ type: 'module' }) + '\n');
await writeFile('dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }) + '\n');

static mirror of HEAD · about · clone: git clone https://ird.cod-sursa.ro/ts.git