-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmetro.config.js
47 lines (39 loc) · 956 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
// /**
// * Metro configuration
// * https://facebook.github.io/metro/docs/configuration
// *
// * @type {import('metro-config').MetroConfig}
// */
// const config = {};
// module.exports = mergeConfig(getDefaultConfig(__dirname), config);
'use strict';
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const config = {};
module.exports = (async () => {
const defaultConfig = await getDefaultConfig(__dirname);
const {
resolver: {assetExts},
} = defaultConfig;
// Thêm các phần mở rộng tài sản bạn muốn hỗ trợ
const newAssetExts = [
...assetExts,
'obj',
'mtl',
'JPG',
'vrx',
'hdr',
'gltf',
'glb',
'GLB',
'bin',
'arobject',
'gif',
'mp4',
];
return mergeConfig(defaultConfig, {
resolver: {
assetExts: newAssetExts,
},
});
})();