2019-08-12 00:28:41 +02:00
|
|
|
const clientGlobs = [
|
|
|
|
{
|
2022-02-19 23:26:54 +01:00
|
|
|
name: 'Client Bundles (main, webpack)',
|
2019-08-12 00:28:41 +02:00
|
|
|
globs: [
|
2020-11-18 19:30:00 +01:00
|
|
|
'.next/static/runtime/+(main|webpack)-*',
|
|
|
|
'.next/static/chunks/!(polyfills*)',
|
2019-11-11 04:24:53 +01:00
|
|
|
],
|
2019-08-12 00:28:41 +02:00
|
|
|
},
|
2019-11-05 22:15:42 +01:00
|
|
|
{
|
|
|
|
name: 'Legacy Client Bundles (polyfills)',
|
2020-11-18 19:30:00 +01:00
|
|
|
globs: ['.next/static/chunks/+(polyfills)-*'],
|
2019-11-05 22:15:42 +01:00
|
|
|
},
|
2019-08-12 00:28:41 +02:00
|
|
|
{
|
|
|
|
name: 'Client Pages',
|
2021-07-07 16:50:24 +02:00
|
|
|
globs: ['.next/static/BUILD_ID/pages/**/*.js', '.next/static/css/**/*'],
|
2019-08-20 08:28:09 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Client Build Manifests',
|
2021-07-07 16:50:24 +02:00
|
|
|
globs: ['.next/static/BUILD_ID/_buildManifest*'],
|
2019-08-24 01:36:44 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Rendered Page Sizes',
|
2019-11-11 04:24:53 +01:00
|
|
|
globs: ['fetched-pages/**/*.html'],
|
|
|
|
},
|
2022-08-15 20:28:31 +02:00
|
|
|
{
|
2022-09-22 02:18:18 +02:00
|
|
|
name: 'Edge SSR bundle Size',
|
|
|
|
globs: [
|
|
|
|
'.next/server/pages/edge-ssr.js',
|
|
|
|
'.next/server/app/app-edge-ssr/page.js',
|
|
|
|
],
|
2022-08-15 20:28:31 +02:00
|
|
|
},
|
2022-06-07 19:05:48 +02:00
|
|
|
{
|
|
|
|
name: 'Middleware size',
|
2022-07-06 20:17:57 +02:00
|
|
|
globs: [
|
|
|
|
'.next/server/middleware*.js',
|
|
|
|
'.next/server/edge-runtime-webpack.js',
|
|
|
|
],
|
2022-06-07 19:05:48 +02:00
|
|
|
},
|
2019-08-12 00:28:41 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
const renames = [
|
|
|
|
{
|
2021-07-07 16:50:24 +02:00
|
|
|
srcGlob: '.next/static/chunks/pages',
|
2019-11-11 04:24:53 +01:00
|
|
|
dest: '.next/static/BUILD_ID/pages',
|
2019-08-12 00:28:41 +02:00
|
|
|
},
|
|
|
|
{
|
2021-07-07 16:50:24 +02:00
|
|
|
srcGlob: '.next/static/BUILD_ID/pages/**/*.js',
|
2021-04-15 13:46:56 +02:00
|
|
|
removeHash: true,
|
2019-08-12 00:28:41 +02:00
|
|
|
},
|
2021-01-19 20:15:45 +01:00
|
|
|
{
|
2021-07-07 16:50:24 +02:00
|
|
|
srcGlob: '.next/static/runtime/*.js',
|
2021-04-15 13:46:56 +02:00
|
|
|
removeHash: true,
|
2021-01-19 20:15:45 +01:00
|
|
|
},
|
2019-08-12 00:28:41 +02:00
|
|
|
{
|
2021-07-07 16:50:24 +02:00
|
|
|
srcGlob: '.next/static/chunks/*.js',
|
2021-04-15 13:46:56 +02:00
|
|
|
removeHash: true,
|
2019-08-12 00:28:41 +02:00
|
|
|
},
|
2019-08-20 08:28:09 +02:00
|
|
|
{
|
|
|
|
srcGlob: '.next/static/*/_buildManifest.js',
|
2019-11-11 04:24:53 +01:00
|
|
|
dest: '.next/static/BUILD_ID/_buildManifest.js',
|
2019-08-20 08:28:09 +02:00
|
|
|
},
|
2019-08-12 00:28:41 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
commentHeading: 'Stats from current PR',
|
|
|
|
commentReleaseHeading: 'Stats from current release',
|
2019-09-14 23:41:05 +02:00
|
|
|
appBuildCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next build',
|
|
|
|
appStartCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next start --port $PORT',
|
2022-07-11 21:54:57 +02:00
|
|
|
appDevCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next --port $PORT',
|
2020-05-27 23:51:11 +02:00
|
|
|
mainRepo: 'vercel/next.js',
|
2019-08-12 00:28:41 +02:00
|
|
|
mainBranch: 'canary',
|
|
|
|
autoMergeMain: true,
|
|
|
|
configs: [
|
|
|
|
{
|
2021-06-30 11:41:55 +02:00
|
|
|
title: 'Default Build',
|
2019-08-12 00:28:41 +02:00
|
|
|
diff: 'onOutputChange',
|
|
|
|
diffConfigFiles: [
|
|
|
|
{
|
|
|
|
path: 'next.config.js',
|
|
|
|
content: `
|
|
|
|
module.exports = {
|
2022-09-22 02:18:18 +02:00
|
|
|
experimental: {
|
|
|
|
appDir: true,
|
|
|
|
},
|
2019-09-09 23:06:13 +02:00
|
|
|
generateBuildId: () => 'BUILD_ID',
|
2019-08-12 00:28:41 +02:00
|
|
|
webpack(config) {
|
|
|
|
config.optimization.minimize = false
|
|
|
|
config.optimization.minimizer = undefined
|
|
|
|
return config
|
|
|
|
}
|
|
|
|
}
|
2019-11-11 04:24:53 +01:00
|
|
|
`,
|
|
|
|
},
|
2019-08-12 00:28:41 +02:00
|
|
|
],
|
|
|
|
// renames to apply to make file names deterministic
|
|
|
|
renames,
|
|
|
|
configFiles: [
|
|
|
|
{
|
|
|
|
path: 'next.config.js',
|
|
|
|
content: `
|
2022-09-22 02:18:18 +02:00
|
|
|
module.exports = {
|
|
|
|
experimental: {
|
|
|
|
appDir: true,
|
|
|
|
},
|
2020-11-18 19:30:00 +01:00
|
|
|
generateBuildId: () => 'BUILD_ID'
|
2019-08-12 00:28:41 +02:00
|
|
|
}
|
2019-11-11 04:24:53 +01:00
|
|
|
`,
|
|
|
|
},
|
2019-08-12 00:28:41 +02:00
|
|
|
],
|
|
|
|
filesToTrack: clientGlobs,
|
2019-08-24 01:36:44 +02:00
|
|
|
// will be output to fetched-pages/${pathname}.html
|
2019-08-12 00:28:41 +02:00
|
|
|
pagesToFetch: [
|
2019-08-24 01:36:44 +02:00
|
|
|
'http://localhost:$PORT/',
|
2019-08-12 20:53:11 +02:00
|
|
|
'http://localhost:$PORT/link',
|
2019-11-11 04:24:53 +01:00
|
|
|
'http://localhost:$PORT/withRouter',
|
|
|
|
],
|
2022-10-15 03:17:45 +02:00
|
|
|
// TODO: investigate replacing "ab" for this
|
|
|
|
// pagesToBench: [
|
|
|
|
// 'http://localhost:$PORT/',
|
|
|
|
// 'http://localhost:$PORT/error-in-render',
|
|
|
|
// ],
|
|
|
|
// benchOptions: {
|
|
|
|
// reqTimeout: 60,
|
|
|
|
// concurrency: 50,
|
|
|
|
// numRequests: 2500,
|
|
|
|
// },
|
2019-08-12 00:28:41 +02:00
|
|
|
},
|
2019-11-11 04:24:53 +01:00
|
|
|
],
|
2019-08-12 00:28:41 +02:00
|
|
|
}
|