We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/_app
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch next-translate-plugin@2.0.5 for the project I'm working on.
next-translate-plugin@2.0.5
Here is the diff that solved my problem which was that plugin is not working with Next.js custom page extensions:
diff --git a/node_modules/next-translate-plugin/lib/cjs/loader.js b/node_modules/next-translate-plugin/lib/cjs/loader.js index 686d7b1..f87ebb7 100644 --- a/node_modules/next-translate-plugin/lib/cjs/loader.js +++ b/node_modules/next-translate-plugin/lib/cjs/loader.js @@ -31,11 +31,11 @@ function loader(rawCode) { return rawCode; } if (hasGetInitialPropsOnAppJs) { - return pageNoExt === '/_app' + return pageNoExt.startsWith('/_app') ? (0, templateWithHoc_1.default)(pagePkg, { hasLoadLocaleFrom: hasLoadLocaleFrom }) : rawCode; } - if (pageNoExt === '/_app') { + if (pageNoExt.startsWith('/_app')) { return (0, templateWithHoc_1.default)(pagePkg, { skipInitialProps: true, hasLoadLocaleFrom: hasLoadLocaleFrom, diff --git a/node_modules/next-translate-plugin/lib/esm/loader.js b/node_modules/next-translate-plugin/lib/esm/loader.js index 4950f3a..6137ff7 100644 --- a/node_modules/next-translate-plugin/lib/esm/loader.js +++ b/node_modules/next-translate-plugin/lib/esm/loader.js @@ -26,11 +26,11 @@ export default function loader(rawCode) { return rawCode; } if (hasGetInitialPropsOnAppJs) { - return pageNoExt === '/_app' + return pageNoExt.startsWith('/_app') ? templateWithHoc(pagePkg, { hasLoadLocaleFrom: hasLoadLocaleFrom }) : rawCode; } - if (pageNoExt === '/_app') { + if (pageNoExt.startsWith('/_app')) { return templateWithHoc(pagePkg, { skipInitialProps: true, hasLoadLocaleFrom: hasLoadLocaleFrom,
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
Feel free to PR @TheMatrixan 👌
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
next-translate-plugin@2.0.5
for the project I'm working on.Here is the diff that solved my problem which was that plugin is not working with Next.js custom page extensions:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: