sPavl0v / react-spa-prenderer

MIT License
34 stars 17 forks source link

Enable Puppeteer config props pass to renderer to streamline CI like GitLab or Travis usage #2

Closed NotOnlyCode closed 3 years ago

NotOnlyCode commented 3 years ago

Great work and great lib in general. There are some issues to run the pre-renderer in remote CI like GitLab for example. Ideally if there would be properties for run to pass some options to Puppeteer launch, but as first attempt, would you consider a small change for launching script like this one:

const browser = await puppeteer.launch({
    args: ['--no-sandbox', '--disable-setuid-sandbox'],
  });

I can create a pull request if only I could submit a branch.

Thanks

NotOnlyCode commented 3 years ago

Here is a link to Puppeteer documentation for that: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#setting-up-chrome-linux-sandbox

sPavl0v commented 3 years ago

Hi @NotOnlyCode, thanks a lot for your feedback! Good note for launch options, i'm setting it up as a priority. I'll provide an ability to pass a variety of Puppeteer options in next version. I should release it next 2-3 days.

NotOnlyCode commented 3 years ago

Hi. Great news. I look forward this feature.

sPavl0v commented 3 years ago

@NotOnlyCode, new feature is available in version 1.0.11. You can pass any options into puppeteer.launch method through .rsp.json file. You can find an example of usage at the bottom of README.md.