-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the bug
Hi, I recently started using sli.dev and encountered what I believe might be a bug with the PDF generator during the build process.
When I set a custom name for the PDF using exportFilename and run the build script, the PDF is generated outside the dist folder (although the link in the slides correctly points to the right path). This behavior only occurs when using a custom name; removing exportFilename makes the PDF appear in the dist directory as expected.
When I tried to include the dist directory in the exportFilename value, the file was correctly placed in the dist folder, but the link in the slides became broken, pointing to /dist/{pdf_filename}.pdf.
Is this a bug or known behavior?
Steps to Reproduce
npm create slidev- Add to the
slides.mdfrontmatter:download: true exportFilename: example-file
- Install
playwright-chromium(npm i -D playwright-chromium) - Run
npm run build - Observe that
example-file.pdfis created in the project root instead of thedistfolder
Environment
- Slidev version: 52.5.0
- Playwright Chromium version: 1.56.1
- Node version: 20.19.5 | 22.21.0
- OS: Arch Linux with bun and npm
EDIT:
I tried to reproduce this bug in this repo.
Steps to Reproduce
- Clone this repo
- Run
pnpm install - Add to the
demo/starter/slides.mdfrontmatter:download: true exportFilename: example-file
- Run
pnpm demo:build - Observe that
example-file.pdfis created indemo/starterinstead of thedocs/.vitepress/dist/demo/starterfolder