Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit dc130ad

Browse files
Update aspnet-prerendering to reference baseUrl in domain-task's main module, not domain-task/fetch. Goal is to avoid Webpack having to bundle isomorphic-fetch on server unless you're actually using it.
1 parent b8913d2 commit dc130ad

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aspnet-prerendering",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Helpers for server-side rendering of JavaScript applications in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
55
"main": "index.js",
66
"scripts": {
@@ -17,7 +17,7 @@
1717
"url": "https://github.com/aspnet/JavaScriptServices.git"
1818
},
1919
"dependencies": {
20-
"domain-task": "^2.0.1"
20+
"domain-task": "^2.0.2"
2121
},
2222
"devDependencies": {
2323
"@types/node": "^6.0.42",

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import * as url from 'url';
33
import * as path from 'path';
44
import * as domain from 'domain';
5-
import { run as domainTaskRun } from 'domain-task/main';
6-
import { baseUrl } from 'domain-task/fetch';
5+
import { run as domainTaskRun, baseUrl as domainTaskBaseUrl } from 'domain-task/main';
76

87
const defaultTimeoutMilliseconds = 30 * 1000;
98

@@ -33,7 +32,7 @@ export function createServerRenderer(bootFunc: BootFunc): RenderToStringFunc {
3332
bindPromiseContinuationsToDomain(domainTaskCompletionPromise, domain['active']);
3433

3534
// Make the base URL available to the 'domain-tasks/fetch' helper within this execution context
36-
baseUrl(absoluteRequestUrl);
35+
domainTaskBaseUrl(absoluteRequestUrl);
3736

3837
// Begin rendering, and apply a timeout
3938
const bootFuncPromise = bootFunc(params);

0 commit comments

Comments
 (0)