Enable server-side prerendering in React+Redux template

This commit is contained in:
SteveSandersonMS
2016-03-07 15:11:13 +00:00
parent cf7a519919
commit c44ceebc12
10 changed files with 54 additions and 22 deletions

View File

@@ -2,7 +2,8 @@
ViewData["Title"] = "Home Page";
}
<div id="react-app">Loading...</div>
<div id="react-app" asp-prerender-module="ClientApp/boot-server"
asp-prerender-webpack-config="webpack.config.js">Loading...</div>
@section scripts {
<script src="~/dist/main.js" asp-append-version="true"></script>

View File

@@ -6,9 +6,7 @@
<title>@ViewData["Title"] - WebApplicationBasic</title>
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true" />
<environment names="Staging,Production">
<link rel="stylesheet" href="~/dist/site.css" asp-append-version="true" />
</environment>
<link rel="stylesheet" href="~/dist/site.css" asp-append-version="true" />
</head>
<body>
@RenderBody()