Remove the resolveModuleSource options.
This commit is contained in:
@@ -57,7 +57,6 @@ const optionNames = new Set([
|
||||
"sourceType",
|
||||
"auxiliaryCommentBefore",
|
||||
"auxiliaryCommentAfter",
|
||||
"resolveModuleSource",
|
||||
"getModuleId",
|
||||
"moduleRoot",
|
||||
"moduleIds",
|
||||
@@ -450,9 +449,10 @@ function normalizeOptions(config) {
|
||||
// check for an unknown option
|
||||
if (!optionNames.has(key)) {
|
||||
if (removed[key]) {
|
||||
const { message, version = 5 } = removed[key];
|
||||
|
||||
throw new ReferenceError(
|
||||
`Using removed Babel 5 option: ${alias}.${key} - ${removed[key]
|
||||
.message}`,
|
||||
`Using removed Babel ${version} option: ${alias}.${key} - ${message}`,
|
||||
);
|
||||
} else {
|
||||
// eslint-disable-next-line max-len
|
||||
|
||||
@@ -56,4 +56,9 @@ export default {
|
||||
whitelist: {
|
||||
message: "Put the specific transforms you want in the `plugins` option",
|
||||
},
|
||||
|
||||
resolveModuleSource: {
|
||||
version: 6,
|
||||
message: "Use `babel-plugin-module-resolver@3`'s 'resolvePath' options",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -166,11 +166,9 @@ export default class File {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Remove this before 7.x's official release. Leaving it in for now to
|
||||
// prevent unnecessary breakage between beta versions.
|
||||
resolveModuleSource(source: string): string {
|
||||
const resolveModuleSource = this.opts.resolveModuleSource;
|
||||
if (resolveModuleSource) {
|
||||
source = resolveModuleSource(source, this.opts.filename);
|
||||
}
|
||||
return source;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user