File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,7 +129,6 @@ export default defineConfig({
129129 title : 'Rollup' ,
130130 transformPageData,
131131 vite : {
132- optimizeDeps : { include : [ 'moment-mini' , '@braintree/sanitize-url' ] } ,
133132 plugins : [
134133 renderMermaidGraphsPlugin ( ) ,
135134 {
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const mermaidRegExp = /^```mermaid\n([\S\s]*?)\n```/gm;
1414const greaterThanRegExp = / & g t ; / g;
1515const styleTagRegExp = / < s t y l e > [ \S \s ] * ?< \/ s t y l e > / gm;
1616const configFileURL = new URL ( 'mermaid.config.json' , import . meta. url ) ;
17+ const puppeteerConfigFileURL = new URL ( 'puppeteer-config.json' , import . meta. url ) ;
1718
1819export function renderMermaidGraphsPlugin ( ) : Plugin {
1920 const existingGraphFileNamesPromise = mkdir ( graphsDirectory , { recursive : true } )
@@ -28,7 +29,9 @@ export function renderMermaidGraphsPlugin(): Plugin {
2829 const inFileURL = new URL ( `${ outFile } .mmd` , graphsDirectory ) ;
2930 await writeFile ( inFileURL , codeBlock ) ;
3031 const { stdout, stderr } = await execPromise (
31- `npx mmdc --configFile ${ fileURLToPath ( configFileURL ) } --input ${ fileURLToPath (
32+ `npx mmdc --configFile ${ fileURLToPath (
33+ configFileURL
34+ ) } --puppeteerConfigFile ${ fileURLToPath ( puppeteerConfigFileURL ) } --input ${ fileURLToPath (
3235 inFileURL
3336 ) } --output ${ fileURLToPath ( outFileURL ) } `
3437 ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "args" : [" --no-sandbox" ]
3+ }
You can’t perform that action at this time.
0 commit comments