Remove `retainLines` and `sourceMaps` options

Summary:
`retainLines` is no longer necessary with the much improved source map generation.
`sourceMaps` is handled by the transformer itself.

Reviewed By: cpojer

Differential Revision: D5237103

fbshipit-source-id: e5c6bf5aa9d553fce9c3f4d59b3ea0057d45cfdc
This commit is contained in:
David Aurelio 2017-06-14 09:25:53 -07:00 committed by Facebook Github Bot
parent d437b31fea
commit 20ed5b8d3a
1 changed files with 4 additions and 3 deletions

View File

@ -114,13 +114,13 @@ function buildBabelConfig(filename, options) {
type Params = {
filename: string,
options: TransformOptions,
options: {+retainLines?: boolean} & TransformOptions,
plugins?: BabelPlugins,
src: string,
};
function transform({filename, options, src}: Params) {
options = options || {};
options = options || {platform: '', projectRoot: '', inlineRequires: false};
const OLD_BABEL_ENV = process.env.BABEL_ENV;
process.env.BABEL_ENV = options.dev ? 'development' : 'production';
@ -141,6 +141,7 @@ function transform({filename, options, src}: Params) {
comments: false,
compact: false,
filename,
retainLines: !!options.retainLines,
sourceFileName: filename,
sourceMaps: true,
}, src);
@ -166,4 +167,4 @@ function getCacheKey() {
module.exports = ({
transform,
getCacheKey,
}: Transformer<>);
}: Transformer<{+retainLines?: boolean}>);