hozana / next-translate-routes

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

Breaks jsxImportSource in Nextjs #45

Closed JacobSoderblom closed 2 years ago

JacobSoderblom commented 2 years ago

First of all, thank you for the time you put into this!

When running with this package in development mode I get Module not found: Can't resolve for the package I'm using as jsxImportSource. I have followed the guide presented on the README, is there anything I'm doing wrong? Or is it just not meant to work with development mode?

I'm running 1.9.0-2

cvolant commented 2 years ago

It works in dev mode: you can check in the exemple in the repo. I never set jsxImportSource yet, not sure how it works. Couldn't it be an issue with the webpack configuration?

JacobSoderblom commented 2 years ago

Yea it probably is! Nextjs is reading the jsxImportSource from the tsconfig.json directly, and for package like theme-ui you need to set the jsxImportSource.

JacobSoderblom commented 2 years ago

Got it working as expected now, must have been something in my project! Thanks for the help any way!