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

Add puppeteer to external packages list #49597

Merged
merged 1 commit into from
May 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/next/src/lib/server-external-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"postcss",
"prettier",
"prisma",
"puppeteer",
Comment on lines 23 to +26
Copy link
Contributor

@kachkaev kachkaev May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"postcss",
"prettier",
"prisma",
"puppeteer",
"playwright",
"postcss",
"prettier",
"prisma",
"puppeteer",

Is it possible to do the same with playwright, given the opportunity? It’s a tool that’s very similar to Puppeteer and it’s growing in popularity quite quickly. Broadly speaking, Playwright is a modern replacement to Puppeteer.

In the meantime, I have to use a trick with eval() to make Playwright work inside a Next.js route handler (it’s a cron job). Setting serverComponentsExternalPackages may be a better replacement to eval() but having an out-of-box solution would be the best.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to open a PR for that!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done by @jocarrd in #49649, thanks!

"rimraf",
"sharp",
"shiki",
Expand Down