Files
MapLibreParticleLab/integration/react-native/MapLibreParticleRNTestHost/metro.config.js
tei d8bb9f547b
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
feat: validate ios RN particle metal path
2026-09-18 22:21:00 +09:00

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;