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.
Error in next export when serverActions is enabled (vercel#50039)
Reland vercel#49959 as it was reverted in vercel#50019 * Only error when runing `next export` or `output` is "export" * Add e2e test Closes NEXT-634
- Loading branch information
Showing
7 changed files
with
59 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
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
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,40 @@ | ||
import { createNextDescribe } from 'e2e-utils' | ||
|
||
createNextDescribe( | ||
'app-dir action handling - next export', | ||
{ | ||
files: __dirname, | ||
skipStart: true, | ||
skipDeployment: true, | ||
}, | ||
({ next, isNextStart }) => { | ||
if (!isNextStart) { | ||
it('skip test for dev mode', () => {}) | ||
return | ||
} | ||
|
||
beforeAll(async () => { | ||
await next.stop() | ||
await next.patchFile( | ||
'next.config.js', | ||
` | ||
module.exports = { | ||
output: 'export', | ||
experimental: { | ||
serverActions: true, | ||
}, | ||
} | ||
` | ||
) | ||
try { | ||
await next.start() | ||
} catch {} | ||
}) | ||
|
||
it('should error when use export output for server actions', async () => { | ||
expect(next.cliOutput).toContain( | ||
`Server Actions are not supported with static export.` | ||
) | ||
}) | ||
} | ||
) |
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