Skip to content

Commit ab831a1

Browse files
committed
scale back the globs to only allow sub directories in server/(edge-)chunks
1 parent bca76bc commit ab831a1

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/build/content/server.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,19 @@ export const copyNextServerCode = async (ctx: PluginContext): Promise<void> => {
9999
: ctx.nextDistDir
100100
const destDir = join(ctx.serverHandlerDir, nextFolder)
101101

102-
const paths = await glob([`*`, `server/**/*`], {
103-
cwd: srcDir,
104-
extglob: true,
105-
})
102+
const paths = await glob(
103+
[
104+
`*`,
105+
`server/*`,
106+
`server/chunks/**/*`,
107+
`server/edge-chunks/**/*`,
108+
`server/+(app|pages)/**/*.js`,
109+
],
110+
{
111+
cwd: srcDir,
112+
extglob: true,
113+
},
114+
)
106115

107116
await Promise.all(
108117
paths.map(async (path: string) => {

0 commit comments

Comments
 (0)