Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flicker on page load #1679

Open
Office-Plus opened this issue Oct 24, 2024 · 0 comments
Open

Flicker on page load #1679

Office-Plus opened this issue Oct 24, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@Office-Plus
Copy link

import { ScullyConfig } from '@scullyio/scully';
import '@scullyio/scully-plugin-puppeteer';
import './scully/plugins/passport-plugin';
import './scully/plugins/visa-details-plugin';
import './scully/plugins/pages-plugin';

/** this loads the default render plugin, remove when switching to something else. */

let executablePath = '';
console.log('process.platform:', process.platform)
switch (process.platform) {
case 'win32':
// executablePath = 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe';
executablePath = 'C:\Program Files\Google\Chrome\Application\chrome.exe';
break;
case 'linux':
executablePath = '/usr/bin/chromium-browser';
break;
case 'darwin':
executablePath = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
break;
default:
console.error(Unsupported platform: ${process.platform});
process.exit(1);
}

export const config: ScullyConfig = {
puppeteerLaunchOptions: {
executablePath: executablePath,
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox'],
},
projectRoot: "./src",
projectName: "travels-website",
spsModulePath: 'YOUR OWN MODULE PATH HERE',
distFolder: './www', // output directory of your Angular build artifacts
outDir: './dist/static', // directory for scully build artifacts
defaultPostRenderers: ['copyAssets'],
routes: {
'/details-page/:livinCountryCode/:visaCountryCode/:productName': {
type: 'visaDetailsPlugin',
},
'/passport/:productId/:productName': {
type: 'passportPlugin',
},
'/pages/details/:id/:name': {
type: 'pagesPlugin',
postRenderers: ['contentFolder'],
}
}
};

@Office-Plus Office-Plus added the documentation Improvements or additions to documentation label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant