Replies: 1 comment 4 replies
-
|
Yes you might. However consider you cannot serialize (back) everything only basic values with JSON.stringify or more advanced with libraries like devalue. One simpler alternatieve is that you directly bundle source config using vite as it supports ts. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Using c12 to load configs at build time/in nodejs environment is trivial.
But what if I want to then use the config as a central piece of my application at runtime?
E.g.: I'm publishing a function in a worker that needs to read from loaded config some settings. At build time I should resolve the final config and bundle it, right? Should I use a vite plugin to do this?
Beta Was this translation helpful? Give feedback.
All reactions