Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Proposal: runtime config support for NUXT_PUBLIC_UMAMI_HOST and NUXT_PUBLIC_UMAMI_ID #132

Open
AndreyYolkin opened this issue Feb 22, 2025 · 2 comments

Comments

@AndreyYolkin
Copy link

Hello and thanks for the repo!
We have a single codebase deployed on different instances, which also have different trackers. Current implementation only checks for ENVs at build time while introduced in v3 format NUXT_PUBLIC_* makes a little confusion, as this is also a prefix for variables defined for runtimeConfig.

I suggest to make it a goal for v4 and do a refactor. I also willing to help to investigate, how to do this in the most painless way

@ijkml
Copy link
Owner

ijkml commented Feb 22, 2025

Hey @AndreyYolkin. Thanks for the suggestion, and glad you’re enjoying the module!

Sorry for the confusion. Can you please tell me a little more about your use-case and the problems you're facing?

@AndreyYolkin
Copy link
Author

Of course!
To simplify, let's say we have a 2 environments where we launch our project. Each one has it's own settings for backend urls, keys and, particularly, analytics. We are making a build without any .env presented (except some feature flags) and later starting the output like node --env-file=".env" .output/server/index.mjs

Currently, the build process have to be aware of umami settings in order to include/exclude runtime files. But I expect at least to be able to override host/id at runtime, preserving the other params.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants