Babel transformations refactoring
Summary: Just a small refactoring to only create array with plugins once. This should make transformations a bit faster as all these methods are called many times for each file in the project. Reviewed By: passy Differential Revision: D21308498 fbshipit-source-id: 0ed47f13cebfebd2992817caa207dc55f1dbeb0a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c21ccedf14
commit
b0a0b0f355
@@ -7,16 +7,16 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
const {transform} = require('../babel-transformer/lib/transform-jest');
|
||||
const isFB = require('./isFB');
|
||||
|
||||
if (isFB && process.env.FLIPPER_FB === undefined) {
|
||||
process.env.FLIPPER_FB = 'true';
|
||||
}
|
||||
|
||||
process.env.FLIPPER_TEST_RUNNER = 'true';
|
||||
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
const {transform} = require('../babel-transformer/lib/transform-jest');
|
||||
|
||||
module.exports = {
|
||||
process(src, filename, config, options) {
|
||||
return transform({
|
||||
|
||||
Reference in New Issue
Block a user