electerious/ackee-lighthouse
在 GitHub 查看Add .env property to allow to set more Browser flags
Open
#10 创建于 2021年7月23日
help wanted
仓库指标
- Star
- (16 star)
- PR 合并指标
- (PR 指标待抓取)
描述
I used the tool locally and I missed the following feature to set a custom browser path:
const createReports = async (endpoint, headers, events, urls, audit) => {
const additionalBrowserFlags = {};
if (process.env.BROWSER_PATH)
additionalBrowserFlags['chromePath'] = process.env.BROWSER_PATH;
const browser = await chromeLauncher.launch({
chromeFlags: ['--headless'],
...additionalBrowserFlags,
});
...
}
.env file:
...
BROWSER_PATH=C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe
...
A such configuration would allow to test with multiple Chromium based browser like in my case Edge. What do you think? Would that be a proper enhancement?