-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
metro.config.js
33 lines (30 loc) · 919 Bytes
/
metro.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* @format
*/
const fs = require('fs');
const path = require('path');
module.exports = {
// WatchFolders is only needed due to the yarn workspace layout of node_modules, we need to watch the symlinked locations separately
watchFolders: [
// Include hoisted modules
path.resolve(__dirname, '../../node_modules'),
],
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};
// Check that we have built our JS files before running the bundler, otherwise we'll get a harder to diagnose "Unable to resolve module" error
if (
!fs.existsSync(
path.resolve(__dirname, 'Libraries/Components/View/ViewWin32.js'),
)
) {
throw new Error(
'[31m\nThis package must be built before running the bundler. Did you mean to run "[39m[33myarn build[39m[31m" first?[39m\n',
);
}