Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make prerender config option false by default #855

Closed
1 of 5 tasks
thescientist13 opened this issue Jan 11, 2022 · 2 comments · Fixed by #857 or #912
Closed
1 of 5 tasks

make prerender config option false by default #855

thescientist13 opened this issue Jan 11, 2022 · 2 comments · Fixed by #857 or #912
Assignees
Labels
Milestone

Comments

@thescientist13
Copy link
Member

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

Coming out of #576 and #812 (and as observed in #639) puppeteer as a heavy dependency. It's not new news by any means, but even for a simple getting started case like npx @greenwood/cli, for just a simple markdown file you still have to download puppeteer and a whole copy of chrome. As "Mr. Wonderful" would say; "stop the madness!"

Also, it uses npm postinstall hooks which is usually limited / blocked in cloud environments like Stackblitz.

Details

So by default, Greenwood should

  1. Set prerender to false
  2. Don't install puppeteer by default (make it an optionalDependecny?)
  3. If user sets prerender: true and tries to run the build, check for puppeteer and if needed, install on the fly
@thescientist13
Copy link
Member Author

thescientist13 commented Feb 16, 2022

Before making this not the default, perhaps we need to be able to accommodate #548 at the same time? Or at least know it's possible, otherwise there is no framework-less option to SSR web components, which is something I want as an option for Greenwood.

@thescientist13
Copy link
Member Author

Another thought here is that we would likely want to update our Getting Started guide and docs since we are demonstrating using JavaScript for what should essentially be static content, which seems counter-intuitive without mentioning

  • prerendering
  • optimization config setting

Perhaps we should introduce an "advanced" step to call this out and how Greenwood can let you write JS for HTML with no runtime cost when combining prerendering with static optimization.

@thescientist13 thescientist13 linked a pull request Mar 18, 2022 that will close this issue
21 tasks
@thescientist13 thescientist13 changed the title make prerender config option false by default (should optionally install puppeteer only if needed) make prerender config option false by default Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant