next-plausible icon indicating copy to clipboard operation
next-plausible copied to clipboard

`withPlausibleProxy()` causes `Union type that is too complex` for next.js `Route`

Open yannxaver opened this issue 1 year ago • 8 comments

I have attached a video to show the problem. Once I wrap my next.js config in withPlausibleProxy the union type with Route becomes too complex. Type checking also becomes extremely slow, hence you have to skip around 30 seconds in the video until the error shows up.

Error:

Expression produces a union type that is too complex to represent.

https://github.com/4lejandrito/next-plausible/assets/17554280/9b076286-af49-4ae7-a157-ac4a92f452c0

yannxaver avatar Nov 28 '23 15:11 yannxaver