mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
28 lines
947 B
JavaScript
28 lines
947 B
JavaScript
/**
|
|
* Browser Launch Configuration
|
|
* Configures Chrome browser launch arguments for optimal performance and stability
|
|
*/
|
|
|
|
module.exports = (on) => {
|
|
on('before:browser:launch', (browser = {}, launchOptions) => {
|
|
if (browser.name === 'chrome') {
|
|
// Common args for all Chrome modes
|
|
launchOptions.args.push(
|
|
'--disable-features=AutofillAccountStorage,PasswordManager',
|
|
'--disable-save-password-bubble',
|
|
'--disable-password-generation',
|
|
'--disable-password-manager-reauthentication',
|
|
'--disable-dev-shm-usage', // Prevents Chrome crashes in CI/Docker
|
|
'--disable-software-rasterizer',
|
|
'--disable-extensions',
|
|
'--js-flags=--max-old-space-size=8192' // Increase Node.js memory to 8GB
|
|
);
|
|
|
|
// Headless-specific optimizations
|
|
if (browser.isHeadless) {
|
|
launchOptions.args.push('--disable-gpu');
|
|
}
|
|
}
|
|
return launchOptions;
|
|
});
|
|
};
|