@nestjs-ssr/react 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -460,9 +460,13 @@ exports.RenderService = class _RenderService {
460
460
  this.defaultHead = defaultHead;
461
461
  this.isDevelopment = process.env.NODE_ENV !== "production";
462
462
  this.ssrMode = ssrMode || process.env.SSR_MODE || "string";
463
- const absoluteTemplatePath = path2.join(__dirname, "../templates/entry-server.tsx");
463
+ const absoluteTemplatePath = path2.join(__dirname, "templates/entry-server.tsx");
464
464
  const relativeToApp = path2.relative(process.cwd(), absoluteTemplatePath);
465
- this.entryServerPath = "/" + relativeToApp.replace(/\\/g, "/");
465
+ if (relativeToApp.startsWith("..")) {
466
+ this.entryServerPath = absoluteTemplatePath;
467
+ } else {
468
+ this.entryServerPath = "/" + relativeToApp.replace(/\\/g, "/");
469
+ }
466
470
  let templatePath;
467
471
  if (this.isDevelopment) {
468
472
  const packageTemplatePaths = [