Skip to content

Commit

Permalink
fix: qrcode-terminal module importing
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 3, 2023
1 parent e3cb751 commit d20d1c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/slidev/node/cli.ts
Expand Up @@ -197,7 +197,7 @@ cli.command(
async action() {
if (!lastRemoteUrl)
return
const { default: qrcode } = await import('qrcode-terminal')
const qrcode = await import('qrcode-terminal').then(r => r.default || r)
qrcode.generate(lastRemoteUrl, { small: true }, (v: string) => {
console.log(`\n${dim(' QR Code for remote control: ')}\n ${blue(lastRemoteUrl!)}\n`)
console.log(v.split('\n').map(i => ` ${i}`).join('\n'))
Expand Down

0 comments on commit d20d1c3

Please sign in to comment.