28 lines
846 B
JavaScript
28 lines
846 B
JavaScript
const fs = require("fs");
|
|
const path = require("path");
|
|
const { getDefaultConfig } = require("expo/metro-config");
|
|
|
|
const config = getDefaultConfig(__dirname);
|
|
config.resolver.assetExts = [...new Set([...config.resolver.assetExts, "f32", "u8", "qbin"])];
|
|
|
|
const packageRoot = path.resolve(__dirname, "../../../packages/maplibre-particle-rn");
|
|
const fixtureCandidates = [
|
|
path.resolve(__dirname, "..", "particle-v3-fields"),
|
|
path.resolve(__dirname, "..", "..", "particle-v3-fields"),
|
|
];
|
|
config.watchFolders = [
|
|
...new Set([
|
|
...(config.watchFolders ?? []),
|
|
...fixtureCandidates.filter((candidate) => fs.existsSync(candidate)),
|
|
packageRoot,
|
|
]),
|
|
];
|
|
config.resolver.nodeModulesPaths = [
|
|
...new Set([
|
|
path.resolve(__dirname, "node_modules"),
|
|
...(config.resolver.nodeModulesPaths ?? []),
|
|
]),
|
|
];
|
|
|
|
module.exports = config;
|