Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor SWC transform to support named default export #46778

Merged
merged 8 commits into from
Mar 6, 2023

Conversation

shuding
Copy link
Member

@shuding shuding commented Mar 4, 2023

Since the default export syntax is not fnDecl but fnExpr I added two new methods to abstract out all the transform logic and made both visit_mut_fn_decl and visit_mut_fn_expr use that.

Next step is to support default exports without an ident (export default async function () {}).

Fixes NEXT-768.

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have a helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • e2e tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.
  • Errors have a helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes by running pnpm build && pnpm lint
  • The "examples guidelines" are followed from our contributing doc

@shuding shuding requested review from timneutkens, ijjk and a team as code owners March 4, 2023 22:06
@ijjk ijjk added created-by: Next.js team PRs by the Next.js team type: next labels Mar 4, 2023
@ijjk

This comment was marked as resolved.

kdy1
kdy1 previously approved these changes Mar 5, 2023
@kodiakhq kodiakhq bot merged commit 440b95e into canary Mar 6, 2023
@kodiakhq kodiakhq bot deleted the shuding/next-768-named-default-export branch March 6, 2023 11:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants