electerious/ackee-lighthouse
GitHub で見るAdd .env property to allow to set more Browser flags
Open
#10 opened on 2021年7月23日
help wanted
Repository metrics
- Stars
- (16 stars)
- PR merge metrics
- (PR metrics pending)
説明
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?