Skip to content

Commit 76903ff

Browse files
chore: disable AppRouter in nextjs-mf
1 parent 5871f1f commit 76903ff

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

packages/nextjs-mf/src/internal.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ const nextNavigationShares = createSharedConfig(
111111
* @property {string|string[]} key.issuerLayer - The webpack layer that can import this shared module.
112112
*/
113113
export const DEFAULT_SHARE_SCOPE: moduleFederationPlugin.SharedObject = {
114-
...reactShares,
115-
...reactDomShares,
116-
...nextNavigationShares,
117-
...jsxRuntimeShares,
114+
// ...reactShares,
115+
// ...reactDomShares,
116+
// ...nextNavigationShares,
117+
// ...jsxRuntimeShares,
118118
'next/dynamic': {
119119
requiredVersion: undefined,
120120
singleton: true,

packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ export class NextFederationPlugin {
108108
p?.constructor?.name === 'BuildManifestPlugin',
109109
);
110110

111-
// if (manifestPlugin) {
112-
// //@ts-ignore
113-
// if (manifestPlugin?.appDirEnabled) {
114-
// throw new Error(
115-
// 'App Directory is not supported by nextjs-mf. Use only pages directory, do not open git issues about this',
116-
// );
117-
// }
118-
// }
111+
if (manifestPlugin) {
112+
//@ts-ignore
113+
if (manifestPlugin?.appDirEnabled) {
114+
throw new Error(
115+
'App Directory is not supported by nextjs-mf. Use only pages directory, do not open git issues about this',
116+
);
117+
}
118+
}
119119

120120
const compilerValid = validateCompilerOptions(compiler);
121121
const pluginValid = validatePluginOptions(this._options);

0 commit comments

Comments
 (0)