next-config: add catch for vercel
commitf1508282449130d9f67477aa9012c80fa4173b7c
authorMatilde Park <matilde.park@urbit.org>
dateWed 17 Aug 2022, 12:24 (4 years ago)
parent7ced9db
next.config.js+12
@@ -1,3 +1,15 @@
1+// For exporting sigil pngs on Vercel, see https://github.com/Automattic/node-canvas/issues/1779#issuecomment-895885846
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+
113module.exports = {
214 reactStrictMode: false,
315 // target: 'serverless',