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

async import() puppeteer only if used when default prerendering #927

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Apr 2, 2022

Related Issue

#916

Realized, due to having puppeteer as a devDependency in the monorepo, and other projects I tested having it as a transitive dependency, i wasn't shielding puppeteer away enough. Basically, even if running build for a static compilation, lifecycles/prerender.js is still getting loaded and so is still going load puppeteer. 🤦

Seeing this behavior in thescientist13/greenwood-starter-presentation#56

Summary of Changes

  1. Only load lib/browser.js when we run preRenderCompilationDefault

@thescientist13 thescientist13 added bug Something isn't working P0 Critical issue that should get addressed ASAP CLI alpha.2 SSR v0.25.0 labels Apr 2, 2022
@thescientist13 thescientist13 added this to the 1.0 milestone Apr 2, 2022
@thescientist13 thescientist13 changed the title aysnc import browser.js only if using default prerender async `import browser.js only if using default prerender Apr 2, 2022
@thescientist13 thescientist13 changed the title async `import browser.js only if using default prerender async import() browser.js only if used when default prerendering Apr 2, 2022
@thescientist13 thescientist13 merged commit 7626891 into release/0.25.0 Apr 2, 2022
@thescientist13 thescientist13 deleted the bug/issue-916-static-compilation-breaks-puppeteer-not-found branch April 2, 2022 13:00
@thescientist13 thescientist13 changed the title async import() browser.js only if used when default prerendering async import() puppeteer only if used when default prerendering Apr 2, 2022
@thescientist13 thescientist13 linked an issue Apr 2, 2022 that may be closed by this pull request
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.2 bug Something isn't working CLI P0 Critical issue that should get addressed ASAP SSR v0.25.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auto-detect and install puppeteer dependency for default prerendering
1 participant