Add server-side rendering (via bundleRenderer, as this is what the Vue docs recommend, and apparently the only way it does encapsulation)

This commit is contained in:
Steve Sanderson
2017-03-10 10:51:47 +00:00
parent 360688f78b
commit 119b274c19
14 changed files with 117 additions and 51 deletions

View File

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

View File

@@ -6,9 +6,6 @@
<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>
</head>
<body>
@RenderBody()