File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
packages/nextjs-mf/src/plugins/NextFederationPlugin Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @module-federation/nextjs-mf ' : patch
3
+ ---
4
+
5
+ Prevent application from compiling if AppDir is used at all
Original file line number Diff line number Diff line change @@ -80,6 +80,19 @@ export class NextFederationPlugin {
80
80
}
81
81
82
82
private validateOptions ( compiler : Compiler ) : boolean {
83
+ const manifestPlugin = compiler . options . plugins . find (
84
+ ( p ) => p ?. constructor . name === 'BuildManifestPlugin' ,
85
+ ) ;
86
+
87
+ if ( manifestPlugin ) {
88
+ //@ts -ignore
89
+ if ( manifestPlugin ?. appDirEnabled ) {
90
+ throw new Error (
91
+ 'App Directory is not supported by nextjs-mf. Use only pages directory, do not open git issues about this' ,
92
+ ) ;
93
+ }
94
+ }
95
+
83
96
const compilerValid = validateCompilerOptions ( compiler ) ;
84
97
const pluginValid = validatePluginOptions ( this . _options ) ;
85
98
const envValid = process . env [ 'NEXT_PRIVATE_LOCAL_WEBPACK' ] ;
@@ -109,6 +122,7 @@ export class NextFederationPlugin {
109
122
if ( this . _extraOptions . debug ) {
110
123
compiler . options . devtool = false ;
111
124
}
125
+
112
126
if ( isServer ) {
113
127
configureServerCompilerOptions ( compiler ) ;
114
128
configureServerLibraryAndFilename ( this . _options ) ;
You can’t perform that action at this time.
0 commit comments