mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 09:23:16 +08:00
Wait for the modules directory to be created before writing module files
Summary: Typo: the operation of writing module files to a common sub-directory didn?t wait until that directory was created, because `Promise.all` was invoked directly as argument to `.then()`, rather than putting it in a lambda function. Reviewed By: andreicoman11 Differential Revision: D3150338 fb-gh-sync-id: c65270b1757a248993048b039f5ebadb281b2eea fbshipit-source-id: c65270b1757a248993048b039f5ebadb281b2eea
This commit is contained in:
committed by
Facebook Github Bot 2
parent
a1e105eea5
commit
b8da6a2963
@@ -41,7 +41,7 @@ function saveAsAssets(bundle, options, log) {
|
||||
const modulesDir = path.join(path.dirname(bundleOutput), MODULES_DIR);
|
||||
const writeUnbundle =
|
||||
createDir(modulesDir).then( // create the modules directory first
|
||||
Promise.all([
|
||||
() => Promise.all([
|
||||
writeModules(modules, modulesDir, encoding),
|
||||
writeFile(bundleOutput, startupCode, encoding),
|
||||
writeMagicFlagFile(modulesDir),
|
||||
|
||||
Reference in New Issue
Block a user