Skip to content

Commit

Permalink
Disable puppeteer sandbox to fix Vercel deployment (#4936)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Apr 11, 2023
1 parent 0bcf0a6 commit 7d62c65
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/.vitepress/config.ts
Expand Up @@ -129,7 +129,6 @@ export default defineConfig({
title: 'Rollup',
transformPageData,
vite: {
optimizeDeps: { include: ['moment-mini', '@braintree/sanitize-url'] },
plugins: [
renderMermaidGraphsPlugin(),
{
Expand Down
5 changes: 4 additions & 1 deletion docs/.vitepress/mermaid.ts
Expand Up @@ -14,6 +14,7 @@ const mermaidRegExp = /^```mermaid\n([\S\s]*?)\n```/gm;
const greaterThanRegExp = />/g;
const styleTagRegExp = /<style>[\S\s]*?<\/style>/gm;
const configFileURL = new URL('mermaid.config.json', import.meta.url);
const puppeteerConfigFileURL = new URL('puppeteer-config.json', import.meta.url);

export function renderMermaidGraphsPlugin(): Plugin {
const existingGraphFileNamesPromise = mkdir(graphsDirectory, { recursive: true })
Expand All @@ -28,7 +29,9 @@ export function renderMermaidGraphsPlugin(): Plugin {
const inFileURL = new URL(`${outFile}.mmd`, graphsDirectory);
await writeFile(inFileURL, codeBlock);
const { stdout, stderr } = await execPromise(
`npx mmdc --configFile ${fileURLToPath(configFileURL)} --input ${fileURLToPath(
`npx mmdc --configFile ${fileURLToPath(
configFileURL
)} --puppeteerConfigFile ${fileURLToPath(puppeteerConfigFileURL)} --input ${fileURLToPath(
inFileURL
)} --output ${fileURLToPath(outFileURL)}`
);
Expand Down
3 changes: 3 additions & 0 deletions docs/.vitepress/puppeteer-config.json
@@ -0,0 +1,3 @@
{
"args": ["--no-sandbox"]
}

1 comment on commit 7d62c65

@vercel
Copy link

@vercel vercel bot commented on 7d62c65 Apr 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

rollup – ./

rollup-rollup-js.vercel.app
rollup-git-master-rollup-js.vercel.app
rollup-eight.vercel.app

Please sign in to comment.