Skip to content

DotnetCoreOpen.PrerenderMiddleware  #10

@skommareddi

Description

@skommareddi

I am trying to follow the below step
Step 1: Use AddPrerenderConfig() in ConfigurationBuilder

var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
// Prerender Step 1: Add Prerender configuration Json file.
.AddPrerenderConfig()
.AddEnvironmentVariables();

This looks a bit outdated. I have the below
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}

Below from program
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{

                webBuilder.UseStartup<Startup>();
            });
}

What would be the best way to .AddPrerenderConfig()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions