Babel编译Typescript exportDefaultFrom错误

时间:2019-04-04 16:42:43

标签: typescript babel

我正在使用Babel编译Typescript代码并遇到此错误:

Page_Load

所以我{ SyntaxError: ....../node_modules/@apollographql/apollo-tools/lib/buildServiceDefinition.d.ts: Support for the experimental syntax 'exportDefaultFrom' isn't currently enabled (3:8): 1 | import { GraphQLSchema, DocumentNode, GraphQLError } from "graphql"; 2 | import { GraphQLResolverMap } from "./schema/resolverMap"; > 3 | export interface GraphQLSchemaModule { | ^ 4 | typeDefs: DocumentNode; 5 | resolvers?: GraphQLResolverMap<any>; 6 | } Add @babel/plugin-proposal-export-default-from (https://git.io/vb4yH) to the 'plugins' section of your Babel config to enable transformation. ,这是我的.babelrc:

npm i @babel/plugin-proposal-export-default-from

但是,错误仍然存​​在。有什么建议吗?

谢谢

0 个答案:

没有答案