forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix invalid config export errors (vercel#16834)
This corrects detecting of invalid page config exports and adds additional test cases for non-invalid config import/exports Closes: vercel#16775
- Loading branch information
Showing
4 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// eslint-disable-next-line no-unused-vars | ||
import { config } from '../../config' | ||
|
||
export const getServerSideProps = () => { | ||
return { | ||
props: {}, | ||
} | ||
} | ||
|
||
export default () => <p>hello world</p> |
10 changes: 10 additions & 0 deletions
10
test/integration/page-config/pages/valid/not-config-export.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// eslint-disable-next-line no-unused-vars | ||
export { config as notConfig } from '../../config' | ||
|
||
export const getServerSideProps = () => { | ||
return { | ||
props: {}, | ||
} | ||
} | ||
|
||
export default () => <p>hello world</p> |
12 changes: 12 additions & 0 deletions
12
test/integration/page-config/pages/valid/not-config-import-export.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// eslint-disable-next-line no-unused-vars | ||
import { config } from '../../config' | ||
|
||
export { config as notConfig } | ||
|
||
export const getServerSideProps = () => { | ||
return { | ||
props: {}, | ||
} | ||
} | ||
|
||
export default () => <p>hello world</p> |