增加puppeteer额外的启动参数
This commit is contained in:
parent
3aaad6954a
commit
9eab9aa71f
@ -3,7 +3,7 @@ import * as jetpack from 'fs-jetpack'
|
||||
import { Game } from '../models/content/Game'
|
||||
import { ZError } from '../common/ZError'
|
||||
import { generateQr } from './Wechat'
|
||||
import nodeHtmlToImage from 'node-html-to-image'
|
||||
import nodeHtmlToImage, { NodeHtmlToImageOptions } from 'node-html-to-image'
|
||||
|
||||
|
||||
export function generateUploadPath(subPath: string) {
|
||||
@ -74,11 +74,13 @@ export function generateCouponImg(shop: string, couponId: string, content: strin
|
||||
html: content,
|
||||
transparent: false,
|
||||
puppeteerArgs: {
|
||||
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||
defaultViewport: {
|
||||
width: 375,
|
||||
height: 667,
|
||||
isMobile: true
|
||||
}}
|
||||
}},
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user