Skip to content

Commit d7cdc14

Browse files
committed
docs: fix vercel build
1 parent 36ea956 commit d7cdc14

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

config/config.js

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
// For building on vercel: https://github.com/Automattic/node-canvas/issues/1779
2+
if (
3+
process.env.LD_LIBRARY_PATH == null ||
4+
!process.env.LD_LIBRARY_PATH.includes(
5+
`${process.env.PWD}/node_modules/canvas/build/Release:`
6+
)
7+
) {
8+
process.env.LD_LIBRARY_PATH = `${
9+
process.env.PWD
10+
}/node_modules/canvas/build/Release:${process.env.LD_LIBRARY_PATH || ''}`
11+
}
12+
113
export default {
214
mode: 'site',
315
title: 'G2Plot React',

0 commit comments

Comments
 (0)