Skip to content

Commit

Permalink
incremental build!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
AsPulse committed Dec 14, 2023
1 parent 44f9128 commit 624e408
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { execa } from 'execa';
import { nodeExternalsPlugin } from 'esbuild-node-externals';
import packageJson from './package.json' assert { type: 'json' };
import { transfer } from 'multi-stage-sourcemap';
import { createCompilerHost, createIncrementalCompilerHost, createProgram } from 'typescript';
import ts from 'typescript';

const entry = './lib.ts';

Expand Down Expand Up @@ -75,10 +75,10 @@ async function types() {
declarationMap: true,
emitDeclarationOnly: true,
};
const host = createIncrementalCompilerHost(options);
const host = ts.createIncrementalCompilerHost(options);
host.writeFile = (fileName: string, contents: string) => createdFiles[fileName] = contents;

const program = createProgram(['./dist/index.ts'], options, host);
const program = ts.createProgram(['./dist/index.ts'], options, host);
program.emit();

console.log(createdFiles);
Expand Down

0 comments on commit 624e408

Please sign in to comment.