From e9859ab25ba7993843747e2a12bc941c6a59a2bf Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Fri, 22 Feb 2019 09:33:05 -0500 Subject: [PATCH] Fix temporary filesystem location This should fix #29. --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 9a602e8..561927c 100644 --- a/src/index.js +++ b/src/index.js @@ -14,7 +14,7 @@ * the License. */ -import os from 'os'; +import fs from 'fs'; import jsdom from 'jsdom'; import loaderUtils from 'loader-utils'; import LibraryTemplatePlugin from 'webpack/lib/LibraryTemplatePlugin'; @@ -96,7 +96,7 @@ async function prerender (parentCompilation, request, options, inject, loader) { const outputOptions = { // fix: some plugins ignore/bypass outputfilesystem, so use a temp directory and ignore any writes. - path: os.tmpdir(), + path: fs.mkdtempSync('prerenderloader'), filename: FILENAME };