-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support default export expression for variables (#46896)
Similar to #46888, this PR adds support for the case: ```js async function foo () {} export default foo ``` ...where you export an ident as a default export expression. Closes NEXT-770 ~Should be landed after #46881.~
- Loading branch information
Showing
3 changed files
with
59 additions
and
13 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
3 changes: 3 additions & 0 deletions
3
packages/next-swc/crates/core/tests/fixture/server-actions/12/input.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,3 @@ | ||
'use server' | ||
async function foo () {} | ||
export default foo |
5 changes: 5 additions & 0 deletions
5
packages/next-swc/crates/core/tests/fixture/server-actions/12/output.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,5 @@ | ||
/* __next_internal_action_entry_do_not_use__ default */ async function foo() {} | ||
foo.$$typeof = Symbol.for("react.server.reference"); | ||
foo.$$id = "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d"; | ||
foo.$$bound = []; | ||
export default foo; |