hozana / next-translate-routes

Flexible and translated routes for Next.js without custom server
MIT License
115 stars 30 forks source link

Plugin can't be used with @sentry/nextjs #48

Closed aleehedl closed 2 years ago

aleehedl commented 2 years ago

When using the @sentry/nextjs plugin, the Sentry's HoC withSentryConfig modifies the _app.tsx's output quite a bit. The result is that next-translate-router/plugin/loader.ts fails while looking for the import of next-translate-routes.

Any ideas how to deal with this?

cvolant commented 2 years ago

Thanks for this report, @aleehedl, it will probably save me some time debugging, since we will setup this plugin in the coming weeks. I will look into it soon.

cvolant commented 2 years ago

@aleehedl I looked into it, struggled to understand what sentry was doing with their new proxyLoader, and finally found a simple solution: changing wrapping order. I added it in the docs.