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

Using Environment Variables inside of sdk.config.ts #38

Open
1 task done
jacobfogolyan opened this issue Oct 29, 2023 · 0 comments
Open
1 task done

Using Environment Variables inside of sdk.config.ts #38

jacobfogolyan opened this issue Oct 29, 2023 · 0 comments

Comments

@jacobfogolyan
Copy link

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
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

No branches or pull requests

1 participant