Skip to content

Commit

Permalink
fix: avoid mocking ws
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Dec 16, 2022
1 parent 7241db1 commit a0e2de5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ declare module 'nitropack' {

if (isEdge) {
// we need to mock some of the static requires from chrome-aws-lambda, puppeteer-core is okay though
nitroConfig.alias.puppeteer = 'unenv/runtime/mock/proxy-cjs'
nitroConfig.alias.ws = 'unenv/runtime/mock/proxy-cjs'
['puppeteer', 'bufferutil', 'utf-8-validate'].forEach((name) => {
nitroConfig.alias[name] = 'unenv/runtime/mock/proxy'
})
}
})

Expand Down

0 comments on commit a0e2de5

Please sign in to comment.