mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-09-20 03:27:09 +03:00
in es5 bablify the original code, not just the prepacked result
Summary: Not sure why I didn't do it this way in the first place. Instead of applying babel to the prepacked code, apply it to them input source code. Make it an apples to apples comparison Closes https://github.com/facebook/prepack/pull/1166 Differential Revision: D6360177 Pulled By: simonhj fbshipit-source-id: 9c9a137178d54a36dc146e18c47b161426f09b5c
This commit is contained in:
parent
994daf7924
commit
e808587c88
@ -380,6 +380,9 @@ function runTest(name, code, options, args) {
|
||||
let i = code.indexOf(injectAtRuntime);
|
||||
addedCode = code.substring(i + injectAtRuntime.length, code.indexOf("\n", i));
|
||||
}
|
||||
if (args.es5) {
|
||||
code = transformWithBabel(code, [], [["env", { forceAllTransforms: true, modules: false }]]);
|
||||
}
|
||||
let unique = 27277;
|
||||
let oldUniqueSuffix = "";
|
||||
let expectedCode = code;
|
||||
|
Loading…
Reference in New Issue
Block a user