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 };