slidev icon indicating copy to clipboard operation
slidev copied to clipboard

Do not export in Browser Exporter if css is not loading properly

Open fourdim opened this issue 3 months ago • 3 comments

Describe the bug

Do not export in Browser Exporter if CSS is not loading properly.

Minimal reproduction

Steps to reproduce the behavior:

  1. Block one CSS used in Browser Exporter
  2. Export

You can use https://sli.dev/new to create a new project to reproduce the issue.

Environment

  • Slidev version: v52.1.0
  • Browser: Chrome
  • OS: Linux

If CSS is not loading properly, pop a alert, and wait for several seconds and reload.

fourdim avatar Sep 15 '25 16:09 fourdim

What does "Block one CSS used in Browser Exporter" mean? In which case would this happen?

kermanx avatar Nov 16 '25 04:11 kermanx

What does "Block one CSS used in Browser Exporter" mean? In which case would this happen?

Block that CSS loading in Devtool Network, Block request URL

Basically, it can reliably simulate the case that CSS loading fails. In my case, vscode ssh port forwarding lost its connection making the export page half loaded. That makes the whole export malformed.

fourdim avatar Nov 16 '25 06:11 fourdim

Image Image

This is what happened when not loading properly. No console log. The slide has 17 pages but only 2 pages appeared in the print. If you see the /export page, its css is not loading properly either. So I do think it is the css not loading properly. BTW, I am not blocking anything and it happens. CC @kermanx

fourdim avatar Dec 10 '25 20:12 fourdim