@samitouri / QOS-React-2 / commits / 42918f40aa

Change build from babylon to babel (#18015)

Dominic Gannaway committed Feb 11, 2020 at 11:56 UTC 42918f40aabd41a324b5dd10652e078dd2c411e6
2 files changed +3 -4
scripts/rollup/build.js
+1 -1
@@ -410,7 +410,7 @@ function getPlugins(
410 // Note that this plugin must be called after closure applies DCE.
411 isProduction && stripUnusedImports(pureExternalModules),
412 // Add the whitespace back if necessary.
413 - shouldStayReadable && prettier({parser: 'babylon'}),
413 + shouldStayReadable && prettier({parser: 'babel'}),
414 // License and haste headers, top-level `if` blocks.
415 {
416 transformBundle(source) {
scripts/shared/__tests__/evalToString-test.js
+2 -3
@@ -7,10 +7,9 @@
7 'use strict';
8
9 const evalToString = require('../evalToString');
10 -const babylon = require('babylon');
10 +const parser = require('@babel/parser');
11
12 -const parse = source =>
13 - babylon.parse(`(${source});`).program.body[0].expression; // quick way to get an exp node
12 +const parse = source => parser.parse(`(${source});`).program.body[0].expression; // quick way to get an exp node
13
14 const parseAndEval = source => evalToString(parse(source));
15