diff --git a/src/cli/compile.ts b/src/cli/compile.ts index b22d489ea4..0b145be1e0 100644 --- a/src/cli/compile.ts +++ b/src/cli/compile.ts @@ -11,7 +11,7 @@ function mkdirp(dir) { if (!fs.existsSync(dir)) fs.mkdirSync(dir); } -export async function compile(input, opts) { +export function compile(input, opts) { if (opts._.length > 0) { error(`Can only compile a single file or directory`); } diff --git a/src/cli/index.ts b/src/cli/index.ts index 52137a6657..411d7f2f1d 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -21,9 +21,10 @@ prog .example('compile src -o dest') .example('compile -f umd MyComponent.html > MyComponent.js') - .action(async (input, opts) => { - const { compile } = await import('./compile.js'); - compile(input, opts); + .action((input, opts) => { + import('./compile.js').then(({ compile }) => { + compile(input, opts); + }); }) .parse(process.argv); \ No newline at end of file