-
Notifications
You must be signed in to change notification settings - Fork 17
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
Loading other config files #11
Comments
Fortunately, you can do that already! If there is the That feature is provided by ASP.NET Core standard way, not by this package. That means the file name of the custom application settings file that will be loaded depends on the name of the hosting environment. By default, the hosting environment name will be "Prerendering" during the prerendering process is running. Please see also the "Hosting Environment" section of the README. |
Yes, you're right. When I did it previously, it seemed like it didn't work - but I just created a test page + options to test this specifically, and it works. My bad, but happy about being wrong in this case! What do you think about possibility to add files with different naming? Let's say I wanted to split As mentioned previously, this is definitely not a pressing matter as can be worked around (or would simply not cause a problem in general) - but if you had capacity to do so, it could make a nice addition! |
That's right, and application setting support has been started from v.1.0.0-preview.13, Dec 2021, about three months ago. :)
Currently, I don't have a plan to implement that feature directly. |
Hey, me yet again!
Currently the package loads
wwwroot/appsettings.json
when pre-rendering. This is absolutely fine for majority of scenarios, and in general, is good enough.However I was thinking - it'd be nice if it'd be possible to load additional config files (IF they exist - cause they might not!), like:
wwwroot/appsettings.<environment>.json
(for examplewwwroot/appsettings.Prerendering.json
);The reason for first is that having different settings during prerendering stage could actually be useful in some scenarios.
The reason why I want to do second is that I want to split some files, because they'll contain a lot of content.
In my case loading other files than json is not needed at all, but could be quite handy when it comes to library flexibility - if it doesn't add too much complexity, of course.
This suggestion absolutely is not a pressing matter, as these things can be worked around - but it'd definitely be a nice-to-have when you have time to add them.
The text was updated successfully, but these errors were encountered: