mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
13 lines
472 B
JavaScript
13 lines
472 B
JavaScript
// Pass through the invocation to the 'aspnet-prerendering' package, verifying that it can be loaded
|
|
module.exports.renderToString = function (callback) {
|
|
var aspNetPrerendering;
|
|
try {
|
|
aspNetPrerendering = require('aspnet-prerendering');
|
|
} catch (ex) {
|
|
callback('To use prerendering, you must install the \'aspnet-prerendering\' NPM package.');
|
|
return;
|
|
}
|
|
|
|
return aspNetPrerendering.renderToString.apply(this, arguments);
|
|
};
|