mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
Move bundle output formats to their own files
Reviewed By: tadeuzagallo Differential Revision: D2702834 fb-gh-sync-id: fca308c5078a11924e071077822fb77d762bd564
This commit is contained in:
committed by
facebook-github-bot-4
parent
3c382a7619
commit
32fa0b7fa1
@@ -11,12 +11,16 @@
|
||||
const buildBundle = require('./buildBundle');
|
||||
const bundleCommandLineArgs = require('./bundleCommandLineArgs');
|
||||
const parseCommandLine = require('../util/parseCommandLine');
|
||||
const outputBundle = require('./output/bundle');
|
||||
const outputPrepack = require('./output/prepack');
|
||||
|
||||
/**
|
||||
* Builds the bundle starting to look for dependencies at the given entry path.
|
||||
*/
|
||||
function bundle(argv, config) {
|
||||
return buildBundle(parseCommandLine(bundleCommandLineArgs, argv), config);
|
||||
const args = parseCommandLine(bundleCommandLineArgs, argv);
|
||||
const output = args.prepack ? outputPrepack : outputBundle;
|
||||
return buildBundle(args, config, output);
|
||||
}
|
||||
|
||||
module.exports = bundle;
|
||||
|
||||
Reference in New Issue
Block a user