Skip to content

Commit 63db02e

Browse files
committed
fix(cli): notify about missing playwright-chromium
1 parent ca85612 commit 63db02e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/slidev/node/export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import path from 'path'
22
import fs from 'fs-extra'
3-
import { chromium } from 'playwright-chromium'
43
import { PDFDocument } from 'pdf-lib'
54
import { blue, cyan, green, yellow } from 'kolorist'
65
import { Presets, SingleBar } from 'cli-progress'
@@ -65,6 +64,7 @@ export async function exportSlides({
6564
if (!packageExists('playwright-chromium'))
6665
throw new Error('The exporting for Slidev is powered by Playwright, please installed it via `npm i playwright-chromium`')
6766

67+
const { chromium } = await import('playwright-chromium')
6868
const browser = await chromium.launch()
6969
const context = await browser.newContext({
7070
viewport: {

0 commit comments

Comments
 (0)