We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent1a8230b commit774696cCopy full SHA for 774696c
src/build/content/server.ts
@@ -146,6 +146,23 @@ export const copyNextServerCode = async (ctx: PluginContext): Promise<void> => {
146
awaitcp(srcPath,destPath,{recursive:true,force:true})
147
}),
148
)
149
+
150
+// this is different node_modules than one handled `copyNextDependencies`
151
+// this is under the standalone/.next folder (not standalone/node_modules)
152
+// and started to be created by Next.js in some cases in next@16.1.0-canary.3
153
+if(existsSync(join(srcDir,'node_modules'))){
154
+constfilter=ctx.constants.IS_LOCAL ?undefined :nodeModulesFilter
155
+constsrc=join(srcDir,'node_modules')
156
+constdest=join(destDir,'node_modules')
157
+awaitcp(src,dest,{
158
+recursive:true,
159
+verbatimSymlinks:true,
160
+force:true,
161
+ filter,
162
+})
163
164
+awaitrecreateNodeModuleSymlinks(ctx.resolveFromSiteDir('node_modules'),dest)
165
+}
166
})
167
}
168