More helpful error message for missing decoratorsBeforeExport in parser (#8576)
This commit is contained in:
@@ -55,8 +55,10 @@ export function validatePlugins(plugins: PluginList) {
|
||||
);
|
||||
if (decoratorsBeforeExport == null) {
|
||||
throw new Error(
|
||||
"The 'decorators' plugin requires a" +
|
||||
" 'decoratorsBeforeExport' option, whose value must be a boolean.",
|
||||
"The 'decorators' plugin requires a 'decoratorsBeforeExport' option," +
|
||||
" whose value must be a boolean. If you are migrating from" +
|
||||
" Babylon/Babel 6 or want to use the old decorators proposal, you" +
|
||||
" should use the 'decorators-legacy' plugin instead of 'decorators'.",
|
||||
);
|
||||
} else if (typeof decoratorsBeforeExport !== "boolean") {
|
||||
throw new Error("'decoratorsBeforeExport' must be a boolean.");
|
||||
|
||||
Reference in New Issue
Block a user