Skip to content

Commit 39f383d

Browse files
committed
fix: add isr warning
1 parent 7595f7e commit 39f383d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/helpers/config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
// @ts-check
1+
/* eslint-disable max-lines */
2+
3+
const { yellowBright } = require('chalk')
24
const { readJSON, existsSync } = require('fs-extra')
5+
const { outdent } = require('outdent')
36
const { join, dirname, relative } = require('pathe')
47
const slash = require('slash')
58

@@ -129,6 +132,13 @@ exports.generateRedirects = async ({ netlifyConfig, basePath, i18n }) => {
129132
})),
130133
{ from: `${basePath}/*`, to: HANDLER_FUNCTION_PATH, status: 200 },
131134
)
135+
if (hasIsr) {
136+
console.log(
137+
yellowBright(outdent`
138+
You have some pages that use ISR (pages that use getStaticProps with revalidate set), which is not currently fully-supported by this plugin. Be aware that results may be unreliable.
139+
`),
140+
)
141+
}
132142
}
133143

134144
exports.getNextConfig = async function getNextConfig({ publish, failBuild = defaultFailBuild }) {
@@ -191,3 +201,4 @@ exports.configureHandlerFunctions = ({ netlifyConfig, publish, ignore = [] }) =>
191201
})
192202
})
193203
}
204+
/* eslint-enable max-lines */

0 commit comments

Comments
 (0)