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

Fix: exports server functions on its own module #2317

Merged
merged 1 commit into from
May 15, 2024

Conversation

eduardoformiga
Copy link
Member

@eduardoformiga eduardoformiga commented May 15, 2024

What's the purpose of this pull request?

Screenshot 2024-05-15 at 12 29 37

We are exporting a server function in the experimental module, and then when we try to use other functions from this file in the starter, like some hook/component/function, we get some errors like:

Screenshot 2024-05-15 at 11 38 47

I think this is happening because this is not tree-shakable, and then the execute function comes together with the module.

In that way, we export the server functions to their module: @faststore/core/experimental/server.

Starters Deploy Preview

I use the codesandbox version from this PR in a starter PR for which we are testing API Extension and section Overrides.

@eduardoformiga eduardoformiga requested a review from a team as a code owner May 15, 2024 15:27
@eduardoformiga eduardoformiga requested review from renatamottam and lucasfp13 and removed request for a team May 15, 2024 15:27
Copy link

vercel bot commented May 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2024 3:29pm

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

@lucasfp13 lucasfp13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eduardoformiga eduardoformiga merged commit 866f66d into main May 15, 2024
7 checks passed
@eduardoformiga eduardoformiga deleted the fix/experimental-function-server-exports branch May 15, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants