Skip to content

Commit e7cbd08

Browse files
committed
refactor: use static import for execSync and remove stale src/local exclude
1 parent 87da782 commit e7cbd08

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

packages/cli/build.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Native binding is built first because TypeScript may depend on generated binding types.
1717
*/
1818

19+
import { execSync } from 'node:child_process';
1920
import { existsSync, globSync, readdirSync, statSync } from 'node:fs';
2021
import { copyFile, mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
2122
import { dirname, join } from 'node:path';
@@ -55,7 +56,7 @@ const napiArgs = process.argv
5556

5657
if (!skipTs) {
5758
await buildCli();
58-
await buildGlobalModules();
59+
buildGlobalModules();
5960
}
6061
// Build native first - TypeScript may depend on the generated binding types
6162
if (!skipNative) {
@@ -162,7 +163,6 @@ async function buildCli() {
162163
// Global CLI modules — bundled by rolldown instead of tsc
163164
'src/create/**',
164165
'src/migration/**',
165-
'src/local/**',
166166
'src/version.ts',
167167
'src/types/**',
168168
],
@@ -179,8 +179,7 @@ async function buildCli() {
179179
}
180180
}
181181

182-
async function buildGlobalModules() {
183-
const { execSync } = await import('node:child_process');
182+
function buildGlobalModules() {
184183
execSync('npx rolldown -c rolldown.config.ts', {
185184
cwd: projectDir,
186185
stdio: 'inherit',

0 commit comments

Comments
 (0)