mirror of https://github.com/status-im/metro.git
Enforce by default a local FileStore cache
Reviewed By: davidaurelio Differential Revision: D7729796 fbshipit-source-id: 03100516973f42a654f849a688e6cbf104c63a68
This commit is contained in:
parent
6b7bffe653
commit
c26e7b7ce2
|
@ -10,9 +10,11 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const blacklist = require('./blacklist');
|
const blacklist = require('./blacklist');
|
||||||
|
const os = require('os');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const {providesModuleNodeModules} = require('./defaults');
|
const {providesModuleNodeModules} = require('./defaults');
|
||||||
|
const {FileStore} = require('metro-cache');
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
GetTransformOptions,
|
GetTransformOptions,
|
||||||
|
@ -178,7 +180,11 @@ const DEFAULT = ({
|
||||||
enhanceMiddleware: middleware => middleware,
|
enhanceMiddleware: middleware => middleware,
|
||||||
extraNodeModules: {},
|
extraNodeModules: {},
|
||||||
assetTransforms: false,
|
assetTransforms: false,
|
||||||
cacheStores: [],
|
cacheStores: [
|
||||||
|
new FileStore({
|
||||||
|
root: path.join(os.tmpdir(), 'metro-cache'),
|
||||||
|
}),
|
||||||
|
],
|
||||||
cacheVersion: '1.0',
|
cacheVersion: '1.0',
|
||||||
dynamicDepsInPackages: 'throwAtRuntime',
|
dynamicDepsInPackages: 'throwAtRuntime',
|
||||||
getAsyncRequireModulePath: () => 'metro/src/lib/bundle-modules/asyncRequire',
|
getAsyncRequireModulePath: () => 'metro/src/lib/bundle-modules/asyncRequire',
|
||||||
|
|
Loading…
Reference in New Issue