Fix release / minified bundle builds

Summary: Fixes building release builds with the new buck integration.

Reviewed By: jeanlauliac

Differential Revision: D5002441

fbshipit-source-id: e7716324c7c8dd0bfcaf5b39cf716ac589e948e8
This commit is contained in:
David Aurelio
2017-05-04 08:31:10 -07:00
committed by Facebook Github Bot
parent 11eef69936
commit 1a0e78c4e4
5 changed files with 37 additions and 19 deletions
+4 -3
View File
@@ -31,8 +31,8 @@ type BuildFn = (
) => void;
type BuildOptions = {|
optimize?: boolean,
platform?: string,
optimize: boolean,
platform: string,
|};
exports.createBuildSetup = (
@@ -96,6 +96,7 @@ function* concat<T>(...iterables: Array<Iterable<T>>): Iterable<T> {
function prelude(optimize) {
return virtualModule(
`var __DEV__=${String(!optimize)},__BUNDLE_START_TIME__=Date.now();`
`var __DEV__=${String(!optimize)},` +
'__BUNDLE_START_TIME__=global.nativePerformanceNow?global.nativePerformanceNow():Date.now();'
);
}