mirror of https://github.com/status-im/metro.git
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:
parent
d437b31fea
commit
20ed5b8d3a
|
@ -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}>);
|
||||
|
|
Loading…
Reference in New Issue