packager: use tempdir by default

Reviewed By: davidaurelio

Differential Revision: D5129430

fbshipit-source-id: 3277341226754fd0a86d2ba3c6d64f3fa1b86e84
This commit is contained in:
Jean Lauliac 2017-05-25 08:52:42 -07:00 committed by Facebook Github Bot
parent e155303543
commit 7f64874c7d
1 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,7 @@
'use strict';
const Logger = require('./src/Logger');
const TransformCaching = require('./src/lib/TransformCaching');
const debug = require('debug');
const invariant = require('fbjs/lib/invariant');
@ -120,7 +121,9 @@ function createServer(options: StrictOptions): Server {
// Some callsites may not be Flowified yet.
invariant(options.reporter != null, 'createServer() requires reporter');
invariant(options.transformCache != null, 'createServer() requires transformCache');
if (options.transformCache == null) {
options.transformCache = TransformCaching.useTempDir();
}
const serverOptions = Object.assign({}, options);
delete serverOptions.verbose;
const ServerClass = require('./src/Server');