Using puppeteer in a wxt / vite project #2215
blikblum
started this conversation in
Show and tell
Replies: 1 comment 2 replies
-
|
See #353 (comment) It's a one-line fix |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When following the official guide to bundle puppeteer in a chrome extension in a wxt project, the extension fails to load due to an UTF8 issue.
After digging a bit, i found that a lot of node libraries are bundled, bringing all kind of stuff like a full JS parser.
I managed to fix it by importing the
connectfunction directly bypassing the module that loads it dynamically depending of the environment.Here is the code that creates a small focused bundle
A hint for those using puppeteer in a chrome extension: is necessary to declare the 'debugger' permission in manifest
Beta Was this translation helpful? Give feedback.
All reactions