refactor: use option-validator in preset-typescript (#12347)

This commit is contained in:
Huáng Jùnliàng
2020-11-20 09:11:20 -05:00
committed by GitHub
parent ab5a90ce47
commit 2e3eec6646
4 changed files with 58 additions and 64 deletions

View File

@@ -29,12 +29,6 @@ export default declare((api, opts) => {
const development = !!opts.development;
const useBuiltIns = !!opts.useBuiltIns;
if (typeof development !== "boolean") {
throw new Error(
"@babel/preset-react 'development' option must be a boolean.",
);
}
const transformReactJSXPlugin =
runtime === "automatic" && development
? transformReactJSXDevelopment