File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 5
5
* This source code is licensed under the BSD-style license found in the
6
6
* LICENSE file in the root directory of this source tree. An additional grant
7
7
* of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ * @flow
8
10
*/
11
+
9
12
'use strict' ;
10
13
11
14
const log = require ( '../util/log' ) . out ( 'bundle' ) ;
@@ -17,15 +20,26 @@ const path = require('path');
17
20
const saveAssets = require ( './saveAssets' ) ;
18
21
const defaultAssetExts = require ( '../../packager/defaults' ) . assetExts ;
19
22
20
- import type RequestOptions from './types.flow' ;
23
+ import type { RequestOptions , OutputOptions } from './types.flow' ;
24
+ import type { ConfigT } from '../util/Config' ;
21
25
22
26
function saveBundle ( output , bundle , args ) {
23
27
return Promise . resolve (
24
28
output . save ( bundle , args , log )
25
29
) . then ( ( ) => bundle ) ;
26
30
}
27
31
28
- function buildBundle ( args , config , output = outputBundle , packagerInstance ) {
32
+ function buildBundle (
33
+ args : OutputOptions & {
34
+ assetsDest : mixed ,
35
+ entryFile : string ,
36
+ resetCache : boolean ,
37
+ transformer : string ,
38
+ } ,
39
+ config : ConfigT ,
40
+ output = outputBundle ,
41
+ packagerInstance ,
42
+ ) {
29
43
// This is used by a bazillion of npm modules we don't control so we don't
30
44
// have other choice than defining it as an env variable here.
31
45
process . env . NODE_ENV = args . dev ? 'development' : 'production' ;
You can’t perform that action at this time.
0 commit comments