im using angular + scully every time while load website its loading one or two time how to...

Discussão em 'Angular' iniciado por om kumar, Outubro 21, 2024.

  1. om kumar

    om kumar Guest

    im using angular + scully every time while loading website its loading one or two time how to fixed this is issue . give me solution for this im using angular with scully . where I need to fix this issue in angular . what would be the issue of that give me correct solutions. how to remove postRenderer

    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'],
    }
    }
    };


    enter image description here

    Continue reading...

Compartilhe esta Página