diff --git a/package-lock.json b/package-lock.json index 147204a..8530cfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@garph/gqty", - "version": "0.4.2", + "version": "0.4.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@garph/gqty", - "version": "0.4.2", + "version": "0.4.3", "license": "MIT", "dependencies": { "@gqty/react": "^3.0.0-alpha-4ad34526.0", diff --git a/src/plugin.ts b/src/plugin.ts index 3d9b5d1..30f546d 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,4 +1,4 @@ -import { importTSmodule } from '@mishushakov/ts-load' +import { importTSmoduleSync } from '@mishushakov/ts-load' import { resolve } from 'path' import serialize from 'babel-literal-to-ast' import { createGeneratedSchema, createScalarsEnumsHash } from './utils' @@ -12,11 +12,11 @@ export default function GarphGQtyPlugin(_, { clientConfig }) { path.node.specifiers = [] } }, - async CallExpression(path, state) { + CallExpression(path, state) { if (state.file.opts.filename !== resolve(clientConfig)) return if (path.node.callee.name !== 'createClient') return - const module = await importTSmodule(state.file.opts.filename) + const module = importTSmoduleSync(state.file.opts.filename) const schema = module.compiledSchema const generatedSchema = createGeneratedSchema(schema) const scalarsEnumsHash = createScalarsEnumsHash(schema)