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

auto-detect and install puppeteer dependency for default prerendering #916

Closed
1 of 5 tasks
thescientist13 opened this issue Mar 18, 2022 · 0 comments · Fixed by #917, #912, #927, #928 or #929
Closed
1 of 5 tasks

auto-detect and install puppeteer dependency for default prerendering #916

thescientist13 opened this issue Mar 18, 2022 · 0 comments · Fixed by #917, #912, #927, #928 or #929
Assignees
Labels
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Mar 18, 2022

Type of Change

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

Summary

Piggy-backing off of #855, the desire is to avoid having the puppeteer dependency need to install by default given how large of a dependency it is. This is especially noticeable when running the basic npx example from the home page or if all you want to build is a more traditional HTML based site without relying on the need for a browser to prerender JS / Web Components.

Instead, it would be great to detect if prerender is set in greenwood.config.js and if so, install it on demand.

This effort also aligns with our our desire to provide a purely JavaScript solution that doesn't need a browser, per #548.

Details

I have started this work in #860 and had made some good progress, but got stuck on getting to work as expected, so this may need to be a two-parter, depending on timeliness of getting the ideal workflow implemented.

At minimum, move puppeteer to be an optionalDependency, then

  1. auto install the dependency in real time when greenwood build is run
  2. Or, fallback to at least communicating to the user the need to install the dependency manually, with additional documentation around the prerender setting in the documentation
@thescientist13 thescientist13 added CLI SSR feature New feature or request labels Mar 18, 2022
@thescientist13 thescientist13 added this to the 1.0 milestone Mar 18, 2022
@thescientist13 thescientist13 added the documentation Greenwood specific docs label Mar 18, 2022
@thescientist13 thescientist13 self-assigned this Mar 18, 2022
@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) feature New feature or request and removed feature New feature or request enhancement Improve something existing (e.g. no docs, new APIs, etc) labels Mar 18, 2022
@thescientist13 thescientist13 added question Further information is requested discussion tied to an ongoing discussion or meeting notes and removed question Further information is requested discussion tied to an ongoing discussion or meeting notes labels Mar 20, 2022
@thescientist13 thescientist13 linked a pull request Mar 20, 2022 that will close this issue
11 tasks
@thescientist13 thescientist13 linked a pull request Apr 1, 2022 that will close this issue
21 tasks
@thescientist13 thescientist13 mentioned this issue Apr 1, 2022
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment