Skip to content

Commit e9859ab

Browse files
authored
Fix temporary filesystem location
This should fix #29.
1 parent ec2320f commit e9859ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* the License.
1515
*/
1616

17-
import os from 'os';
17+
import fs from 'fs';
1818
import jsdom from 'jsdom';
1919
import loaderUtils from 'loader-utils';
2020
import LibraryTemplatePlugin from 'webpack/lib/LibraryTemplatePlugin';
@@ -96,7 +96,7 @@ async function prerender (parentCompilation, request, options, inject, loader) {
9696

9797
const outputOptions = {
9898
// fix: some plugins ignore/bypass outputfilesystem, so use a temp directory and ignore any writes.
99-
path: os.tmpdir(),
99+
path: fs.mkdtempSync('prerenderloader'),
100100
filename: FILENAME
101101
};
102102

0 commit comments

Comments
 (0)