Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions packages/next/src/build/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1580,38 +1580,6 @@ export async function isPageStatic({
const hasStaticProps = !!componentsResult.getStaticProps
const hasStaticPaths = !!componentsResult.getStaticPaths
const hasServerProps = !!componentsResult.getServerSideProps
const hasLegacyServerProps = !!(await componentsResult.ComponentMod
.unstable_getServerProps)
const hasLegacyStaticProps = !!(await componentsResult.ComponentMod
.unstable_getStaticProps)
const hasLegacyStaticPaths = !!(await componentsResult.ComponentMod
.unstable_getStaticPaths)
const hasLegacyStaticParams = !!(await componentsResult.ComponentMod
.unstable_getStaticParams)

if (hasLegacyStaticParams) {
throw new Error(
`unstable_getStaticParams was replaced with getStaticPaths. Please update your code.`
)
}

if (hasLegacyStaticPaths) {
throw new Error(
`unstable_getStaticPaths was replaced with getStaticPaths. Please update your code.`
)
}

if (hasLegacyStaticProps) {
throw new Error(
`unstable_getStaticProps was replaced with getStaticProps. Please update your code.`
)
}

if (hasLegacyServerProps) {
throw new Error(
`unstable_getServerProps was replaced with getServerSideProps. Please update your code.`
)
}

// A page cannot be prerendered _and_ define a data requirement. That's
// contradictory!
Expand Down
7 changes: 0 additions & 7 deletions test/integration/legacy-ssg-methods-error/pages/index.js

This file was deleted.

58 changes: 0 additions & 58 deletions test/integration/legacy-ssg-methods-error/test/index.test.js

This file was deleted.

18 changes: 0 additions & 18 deletions test/integration/prerender-legacy/pages/blog/[post].js

This file was deleted.

18 changes: 0 additions & 18 deletions test/integration/prerender-legacy/test/index.test.js

This file was deleted.