Remove the sourceMapTarget option from core and implement it in babel-cli. (#7500)
This commit is contained in:
@@ -119,9 +119,6 @@ const COMMON_VALIDATORS: ValidatorSet = {
|
||||
sourceMap: (assertSourceMaps: Validator<
|
||||
$PropertyType<ValidatedOptions, "sourceMap">,
|
||||
>),
|
||||
sourceMapTarget: (assertString: Validator<
|
||||
$PropertyType<ValidatedOptions, "sourceMapTarget">,
|
||||
>),
|
||||
sourceFileName: (assertString: Validator<
|
||||
$PropertyType<ValidatedOptions, "sourceFileName">,
|
||||
>),
|
||||
@@ -192,7 +189,6 @@ export type ValidatedOptions = {
|
||||
// Sourcemap generation options.
|
||||
sourceMaps?: SourceMapsOption,
|
||||
sourceMap?: SourceMapsOption,
|
||||
sourceMapTarget?: string,
|
||||
sourceFileName?: string,
|
||||
sourceRoot?: string,
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@ export default {
|
||||
message: "Put the specific transforms you want in the `plugins` option",
|
||||
},
|
||||
sourceMapName: {
|
||||
message: "Use the `sourceMapTarget` option",
|
||||
message:
|
||||
"The `sourceMapName` option has been removed because it makes more sense for the tooling that calls Babel to assign `map.file` themselves.",
|
||||
},
|
||||
stage: {
|
||||
message:
|
||||
@@ -64,4 +65,10 @@ export default {
|
||||
message:
|
||||
"Generated plugin metadata is always included in the output result",
|
||||
},
|
||||
|
||||
sourceMapTarget: {
|
||||
version: 6,
|
||||
message:
|
||||
"The `sourceMapTarget` option has been removed because it makes more sense for the tooling that calls Babel to assign `map.file` themselves.",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -15,7 +15,6 @@ export default function normalizeOptions(config: ResolvedConfig): {} {
|
||||
sourceRoot = moduleRoot,
|
||||
|
||||
sourceFileName = filenameRelative,
|
||||
sourceMapTarget = filenameRelative,
|
||||
|
||||
comments = true,
|
||||
compact = "auto",
|
||||
@@ -47,7 +46,6 @@ export default function normalizeOptions(config: ResolvedConfig): {} {
|
||||
|
||||
// Source-map generation flags.
|
||||
sourceMaps,
|
||||
sourceMapTarget,
|
||||
sourceRoot,
|
||||
sourceFileName,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user