codimd icon indicating copy to clipboard operation
codimd copied to clipboard

WIP: Export PDF with puppeteer

Open Yukaii opened this issue 5 years ago • 4 comments

It takes about 5 seconds to print a pdf now... quite slow.

TODO

  • [ ] Better download experience
  • [ ] Is this safe?
  • [ ] NPM_CONFIG_PRODUCTION true

Yukaii avatar Mar 09 '20 13:03 Yukaii

Heroku image is too big when building with puppeteer buildpack

  • https://github.com/jontewks/puppeteer-heroku-buildpack
  • https://github.com/CoffeeAndCode/puppeteer-heroku-buildpack

I'll try to move all webpack build dependency into devDependency, then let heroku remove them automatically.

Yukaii avatar Mar 14 '20 15:03 Yukaii

-----> Compressing...
 !     Compiled slug size: 612.6M is too large (max is 500M).
 !     See: http://devcenter.heroku.com/articles/slug-size
 !     Push failed

https://devcenter.heroku.com/articles/slug-compiler#slug-size

Yukaii avatar Mar 14 '20 15:03 Yukaii

-----> Compressing...
 !     Compiled slug size: 520.4M is too large (max is 500M).
 !     See: http://devcenter.heroku.com/articles/slug-size
 !     Push failed

well, well 😂

Yukaii avatar Mar 19 '20 13:03 Yukaii

       Procfile declares types -> web
-----> Compressing...
       Done: 493.6M
-----> Launching...
 !     Warning: Your slug size (493 MB) exceeds our soft limit (300 MB) which may affect boot time.
       Released v10
       https://codimd-feature-pdf-expo-las27r.herokuapp.com/ deployed to Heroku

Yukaii avatar Mar 19 '20 13:03 Yukaii