Closed awinogrodzki closed 1 year ago
@aralroca I see that build is failing due to 500
error during Node.js setup action. I cannot retry the build myself. Did you encounter similar issues before?
To be honest, this is the first time I have seen this error. I hit rerun to see if it goes. If not, don't worry it doesn't seem to be related to your changes
@aralroca when will there be a release of this? 👼
@thomasverleye I will try it to do it today
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update [X] Bug fix [X] New feature [ ] Other, please explain:
What changes did you make? (Give an overview)
Check if
pagesInDir
provided by the user is Next.js 13 app-dir and use templateAppDir loader instead of default oneContext
I use both Next.js 13 app-dir feature as well as Next.js Api Routes inside
pages/api/*.ts
.Without
pagesInDir
option,next-translate-plugin@2.0.2
findspages
directory and assumes there is no Next.js 13 app dir, although I usepages
dir only for api routesI cannot use Next.js 13.2 app Route Handler due to https://github.com/aralroca/next-translate-plugin/issues/11 , which means I am forced to use
pages/api
dir for API handlersThe approach I decided on is: when user passes custom
pagesInDir
that points to Next.js 13 app directory, we setisAppDirNext13
to true that forces the use oftemplateAppDir
loader