-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmetro.config.js
More file actions
31 lines (28 loc) · 904 Bytes
/
Copy pathmetro.config.js
File metadata and controls
31 lines (28 loc) · 904 Bytes
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
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const path = require('path');
const webGpuConfig = require('react-native-webgpu/metro');
const threeConfig = require('react-native-webgpu-three/metro');
const root = path.resolve(__dirname, '../..');
const defaultConfig = getDefaultConfig(__dirname);
/**
* Metro configuration
* https://reactnative.dev/docs/metro
*
* @type {import('@react-native/metro-config').MetroConfig}
*/
const config = {
watchFolders: [root],
resolver: {
resolveRequest: threeConfig.resolver.resolveRequest,
unstable_enablePackageExports: true,
sourceExts: [
...defaultConfig.resolver.sourceExts,
...webGpuConfig.resolver.sourceExts,
'gltf',
],
},
transformer: {
babelTransformerPath: require.resolve('./babel/gltf-babel-transformer'),
},
};
module.exports = mergeConfig(defaultConfig, config);