Skip to content

Commit eb39d7f

Browse files
committed
feat: show summary build status
1 parent 296a7f1 commit eb39d7f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

index.js

+8
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,20 @@ module.exports = {
7777

7878
async onPostBuild({ netlifyConfig, packageJson, constants: { FUNCTIONS_DIST }, utils }) {
7979
if (await doesNotNeedPlugin({ netlifyConfig, packageJson, utils })) {
80+
utils.status.show({
81+
title: 'Essential Next.js Build Plugin did not run',
82+
summary: 'The site either uses static export, or manually runs next-on-netlify',
83+
})
8084
return
8185
}
8286

8387
const nextConfig = await getNextConfig(utils.failBuild)
8488
await saveCache({ cache: utils.cache, distDir: nextConfig.distDir })
8589
copyUnstableIncludedDirs({ nextConfig, functionsDist: FUNCTIONS_DIST })
90+
utils.status.show({
91+
title: 'Essential Next.js Build Plugin ran successfully',
92+
summary: 'Generated serverless functions and stored the Next.js cache',
93+
})
8694
},
8795
}
8896

test/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ const utils = {
2222
save() {},
2323
restore() {},
2424
},
25+
status: {
26+
show() {},
27+
},
2528
}
2629

2730
// Temporary switch cwd

0 commit comments

Comments
 (0)