Hi there! Am getting a warning from Vercel for our Serverless Functions Warning: Max serverless function size of 50 MB compressed or 250 MB uncompressed almost reached.
Looks like canvas is being included via PDFjs, and it's compressed size is 42.82 MB, ouch.
- wondering if canvas is even required?!
- trying to test if it's required but using
outputFileTracingExcludesto exclude it from the serverless function page outputFileTracingExcludesseemingly not working - could be my paths are wrong??
Tried each of the following arrays standalone in next.config.js, none seemed to trigger:
experimental: {
outputFileTracingExcludes: {
'*': [
'node_modules/canvas/build',
],
'*': [
'./node_modules/canvas/build',
],
'/pages/paper/view/*': [
'./node_modules/canvas/build',
],
},
},
Any ideas here? On either ignoring, or helping with the large Serverless Function build?