Skip to content

Commit 61c2458

Browse files
authored
fix: default to target server, not serverless (#2060)
1 parent a37fb72 commit 61c2458

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/runtime/src/helpers/files.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const moveStaticPages = async ({
8585
basePath?: string
8686
}): Promise<void> => {
8787
console.log('Moving static page files to serve from CDN...')
88-
const outputDir = join(netlifyConfig.build.publish, target === 'server' ? 'server' : 'serverless')
88+
const outputDir = join(netlifyConfig.build.publish, target === 'serverless' ? 'serverless' : 'server')
8989
const buildId = readFileSync(join(netlifyConfig.build.publish, 'BUILD_ID'), 'utf8').trim()
9090
const dataDir = join('_next', 'data', buildId)
9191
await ensureDir(join(netlifyConfig.build.publish, dataDir))
@@ -134,6 +134,7 @@ export const moveStaticPages = async ({
134134
const dest = join(netlifyConfig.build.publish, targetPath)
135135

136136
try {
137+
console.log(`Moving ${source} to ${dest}`)
137138
await move(source, dest)
138139
} catch (error) {
139140
console.warn('Error moving file', source, error)

0 commit comments

Comments
 (0)