vtex / faststore

Digital commerce toolkit for frontend developers
https://faststore.dev
MIT License
186 stars 58 forks source link

Fix: exports server functions on its own module #2317

Closed eduardoformiga closed 3 months ago

eduardoformiga commented 3 months ago

What's the purpose of this pull request?

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.

vercel[bot] commented 3 months ago

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
codesandbox-ci[bot] commented 3 months ago

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.