You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is your question / Please describe your issue
Since you would need to add env vars to the sdk.config.ts file, you cannot access environment variables directly. As you probably noticed, you need to add environment variables to your runtimeConfig.public. But since we are locked into this approach, you will need to make this a function to be exported and access const $config = useRuntimeConfig() inside this function.
However the issue with this is, then it can only be called within nuxt context. Which means you need to export a function, not the object. Then of course you need to change all references to this.
What version of Nuxt3-Magento2-Store are you using?
1.0.0
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
What is your question / Please describe your issue
Since you would need to add env vars to the sdk.config.ts file, you cannot access environment variables directly. As you probably noticed, you need to add environment variables to your
runtimeConfig.public
. But since we are locked into this approach, you will need to make this a function to be exported and accessconst $config = useRuntimeConfig()
inside this function.However the issue with this is, then it can only be called within nuxt context. Which means you need to export a function, not the object. Then of course you need to change all references to this.
What version of Nuxt3-Magento2-Store are you using?
1.0.0
Code of Conduct
The text was updated successfully, but these errors were encountered: