mirror of https://github.com/status-im/metro.git
packager: use tempdir by default
Reviewed By: davidaurelio Differential Revision: D5129430 fbshipit-source-id: 3277341226754fd0a86d2ba3c6d64f3fa1b86e84
This commit is contained in:
parent
e155303543
commit
7f64874c7d
|
@ -12,6 +12,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const Logger = require('./src/Logger');
|
const Logger = require('./src/Logger');
|
||||||
|
const TransformCaching = require('./src/lib/TransformCaching');
|
||||||
|
|
||||||
const debug = require('debug');
|
const debug = require('debug');
|
||||||
const invariant = require('fbjs/lib/invariant');
|
const invariant = require('fbjs/lib/invariant');
|
||||||
|
@ -120,7 +121,9 @@ function createServer(options: StrictOptions): Server {
|
||||||
|
|
||||||
// Some callsites may not be Flowified yet.
|
// Some callsites may not be Flowified yet.
|
||||||
invariant(options.reporter != null, 'createServer() requires reporter');
|
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);
|
const serverOptions = Object.assign({}, options);
|
||||||
delete serverOptions.verbose;
|
delete serverOptions.verbose;
|
||||||
const ServerClass = require('./src/Server');
|
const ServerClass = require('./src/Server');
|
||||||
|
|
Loading…
Reference in New Issue