Skip to content

fix: backward compatible runtime env vars for client plugins#385

Closed
aldarund wants to merge 1 commit intonuxt:mainfrom
aldarund:aldarund-patch-1
Closed

fix: backward compatible runtime env vars for client plugins#385
aldarund wants to merge 1 commit intonuxt:mainfrom
aldarund:aldarund-patch-1

Conversation

@aldarund
Copy link
Copy Markdown

@aldarund aldarund commented Jul 6, 2022

🔗 Linked issue

#9

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

allows access env vars in bridge via $store in plugins on client

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

req: event.req,
res: event.res,
runtimeConfig: { private: config, public: { public: config.public, app: config.app } },
runtimeConfig: { private: config, public: { ...config.public, public: config.public, app: config.app } },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It should be handled by the runtime proxy.

Copy link
Copy Markdown
Author

@aldarund aldarund Jul 6, 2022

Choose a reason for hiding this comment

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

As i understand runtime proxy is a config object itself that comes from composable useRuntimeConfig , but here its set values as a new object with public and app path, which nullify that proxy so it leads to no props at root like nuxt 2 expect. And thats the reason why composable works fine but not when getting $config from context

@danielroe
Copy link
Copy Markdown
Member

@aldarund Would you check whether #552 resolves the issue for you?

@danielroe
Copy link
Copy Markdown
Member

Closing as I think the root issue is solved, but please ping me if not 🙏

@danielroe danielroe closed this Oct 2, 2022
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.

3 participants