Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
sourceMapUrl,
dev: args.dev,
minify: args.minify !== undefined ? args.minify : !args.dev,
platform: args.platform,
};
const server = new Server(config);
try {
const bundle = await output.build(server, requestOpts);
await output.save(bundle, args, logger.info);
// Save the assets of the bundle
const outputAssets: AssetData[] = await server.getAssets({
...Server.DEFAULT_BUNDLE_OPTIONS,
...requestOpts,
bundleType: 'todo',
});
// When we're done saving bundle output and the assets, we're done.
return await saveAssets(outputAssets, args.platform, args.assetsDest);
} finally {
server.end();
}
}
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,
});
} catch (e) {
error = e;
} finally {
server.end();
}
if (error) {
throw error;
}
return assetManifest;
}