You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
First of all, thanks a lot for your great work with Nextra and the update to Nextra 4.
I'm currently updating to Nextra 4 and I have the following situation.
My existing Next.js AppDir website with a locales uses next-intl for localisation (https://github.com/amannn/next-intl) and is using many different types of .tsx pages, groups etc: (pages) [pages].
This was perfectly fine in Nextra 3 since nextra content was in /pages. I migrated the website to Nextra 4 using the Using Content Directory Convention and the issue is that my AppDir content (which deosn't contain any Nextra page) is crashing the PageMap function.
Right now, I have to patch the Nextra 4 code to force it to ignore AppDir content, this way it work.
=> Would it be possible to add an option in withNextra config param not to explore the AppDir content when Nextra content is set to use the Content Directory Convention please ?
Here is the patch I had to add:
diff--gita/dist/server/page-map/find-meta-and-page-file-paths.jsb/dist/server/page-map/find-meta-and-page-file-paths.jsindexe9bdc946c78e917d83de9584c04206d0c62a84a8..9cd9c92e88991e0a475f1eb19671b4445322ebe0100644---a/dist/server/page-map/find-meta-and-page-file-paths.js+++b/dist/server/page-map/find-meta-and-page-file-paths.js
@@ -14,13+14,15 @@ asyncfunctionfindMetaAndPageFilePaths({`${contentDir}/**/_meta.{js,jsx,ts,tsx}`,// Include `_meta` files from `content` directory`${contentDir}/**/*.{md,mdx}`,-// Include all Markdown/MDX files from `content` directory-`${appDir}/**/page.{js,jsx,jsx,tsx,md,mdx}`,-`${appDir}/**/_meta.{js,jsx,ts,tsx}`,-// Include `_meta` files from `app` directory-`${appDir}/_meta.global.{js,jsx,ts,tsx}`,-// Include global `_meta` file from `app` directory-`!${appDir}/**/{_,[}*/*`+// START LOCAL PATCH+// // Include all Markdown/MDX files from `content` directory+// `${appDir}/**/page.{js,jsx,jsx,tsx,md,mdx}`,+// `${appDir}/**/_meta.{js,jsx,ts,tsx}`,+// // Include `_meta` files from `app` directory+// `${appDir}/_meta.global.{js,jsx,ts,tsx}`,+// // Include global `_meta` file from `app` directory+// `!${appDir}/**/{_,[}*/*`+// END LOCAL PATCH// Ignore subdirectories starting with `_` and dynamic routes] : ["**/_meta.{js,jsx,ts,tsx}","**/*.{md,mdx}"];constresult=awaitfg(pattern,{ cwd });
Hello!
First of all, thanks a lot for your great work with Nextra and the update to Nextra 4.
I'm currently updating to Nextra 4 and I have the following situation.
My existing Next.js AppDir website with a locales uses next-intl for localisation (https://github.com/amannn/next-intl) and is using many different types of .tsx pages, groups etc: (pages) [pages].
This was perfectly fine in Nextra 3 since nextra content was in /pages. I migrated the website to Nextra 4 using the Using Content Directory Convention and the issue is that my AppDir content (which deosn't contain any Nextra page) is crashing the PageMap function.
Right now, I have to patch the Nextra 4 code to force it to ignore AppDir content, this way it work.
=> Would it be possible to add an option in withNextra config param not to explore the AppDir content when Nextra content is set to use the Content Directory Convention please ?
Here is the patch I had to add:
And here is the error:
The text was updated successfully, but these errors were encountered: