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 коммит произвёл Facebook Github Bot
Родитель 9e8a39ce2c
Коммит 44cd9fcded
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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');