Skip to content
This repository was archived by the owner on Dec 20, 2018. It is now read-only.

Commit c6e91ed

Browse files
Don't do ServerSideRendering in templates
1 parent a41421b commit c6e91ed

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

src/Microsoft.DotNet.Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
1111

1212
<!-- Set this to true if you enable server-side prerendering -->
13-
<BuildServerSideRenderer>true</BuildServerSideRenderer>
13+
<BuildServerSideRenderer>false</BuildServerSideRenderer>
1414
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
1515
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
1616
</PropertyGroup>
@@ -50,7 +50,6 @@
5050
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
5151
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
5252
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition=" '$(BuildServerSideRenderer)' == 'true' " />
53-
<Exec WorkingDirectory="$(SpaRoot)dist-server\" Command="uglifyjs main.js --output main.js" />
5453

5554
<!-- Include the newly-built files in the publish output -->
5655
<ItemGroup>

src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package-lock.json

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Microsoft.DotNet.Web.Spa.ProjectTemplates/content/Angular-CSharp/Startup.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
6767

6868
spa.Options.SourcePath = "ClientApp";
6969

70-
spa.UseSpaPrerendering(options =>
71-
{
72-
options.BootModulePath = $"{spa.Options.SourcePath}/dist-server/main.bundle.js";
73-
options.BootModuleBuilder = env.IsDevelopment()
74-
? new AngularCliBuilder(npmScript: "build:ssr")
75-
: null;
76-
options.ExcludeUrls = new[] { "/sockjs-node" };
77-
});
78-
7970
if (env.IsDevelopment())
8071
{
8172
spa.UseAngularCliServer(npmScript: "start");

0 commit comments

Comments
 (0)