Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function fetchAssetManifestAsync(platform, projectRoot, entryFile) {
// Project-level babel config does not load unless we change to the
// projectRoot before instantiating the server
process.chdir(projectRoot);
const config = await loadAsync(projectRoot);
const server = new Server(config);
const requestOpts = {
entryFile,
dev: false,
minify: false,
platform,
};
let assetManifest;
let error;
try {
assetManifest = await server.getAssets({
...Server.DEFAULT_BUNDLE_OPTIONS,
...requestOpts,
});