next-translate-plugin icon indicating copy to clipboard operation
next-translate-plugin copied to clipboard

feat: add basePath as config option

Open myabeaver opened this issue 2 years ago • 8 comments

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update [ ] Bug fix [x] New feature [ ] Other, please explain:

What changes did you make? (Give an overview)

  • added option to set basePath

myabeaver avatar Jun 29 '23 12:06 myabeaver

@myasteiner ping 🏓 🤗

aralroca avatar Jul 11 '23 14:07 aralroca

:hugs: :ping_pong:

laneme avatar Jul 22 '23 21:07 laneme

Is it possible to takeover?

mkbctrl avatar Aug 06 '23 15:08 mkbctrl

Is it possible to takeover?

when the changes I have mentioned in the comments have been made. If we see that @myasteiner does not have time, we would implement it in another PR.

aralroca avatar Aug 08 '23 12:08 aralroca

Sorry, I would do that if the coming weeks I've nobody has time before.

myabeaver avatar Aug 24 '23 12:08 myabeaver

Is it possible to takeover?

when the changes I have mentioned in the comments have been made. If we see that @myasteiner does not have time, we would implement it in another PR.

I've updated the PR does it look good for you? Btw, can we maybe also add an option to opt-out of getStaticProps per default? @aralroca

myabeaver avatar Aug 29 '23 14:08 myabeaver

Hey @aralroca , would you mind taking a look at this PR? This is something that's a blocker for upgrading dependencies which bring very nice additions :)

jporsay avatar Sep 20 '23 09:09 jporsay

For the time being, I've released @webpro/[email protected]. Example CJS usage:

nextTranslate({ nextTranslate: { basePath: __dirname } })

Note that I've changed the implementation a bit compared to this PR (so you can pass the basePath and it won't be touched):

  let basePath =
    nextTranslate.basePath ??
    path.resolve(
      path.relative(pkgDir(), process.env.NEXT_TRANSLATE_PATH || '.')
    )

webpro avatar Oct 06 '23 09:10 webpro