diff --git a/src/core/resolvers/quasar.ts b/src/core/resolvers/quasar.ts index 3163b21e..aa2bb1d7 100644 --- a/src/core/resolvers/quasar.ts +++ b/src/core/resolvers/quasar.ts @@ -1,5 +1,3 @@ -import { promises as fs } from 'node:fs' -import { resolveModule } from 'local-pkg' import type { ComponentResolver } from '../../types' /** @@ -14,9 +12,12 @@ export function QuasarResolver(): ComponentResolver { type: 'component', resolve: async (name: string) => { if (!components.length) { - const quasarApiListPath = resolveModule('quasar/dist/transforms/api-list.json') - if (quasarApiListPath) - components = JSON.parse(await fs.readFile(quasarApiListPath, 'utf-8')) + ({ + default: components, + } // @ts-expect-error no quasar types + = await import('quasar/dist/transforms/api-list.json', { + assert: { type: 'json' }, + })) } if (components.includes(name)) diff --git a/tsup.config.ts b/tsup.config.ts index 674d9e4d..bc5c25dd 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -5,6 +5,7 @@ export const tsup: Options = { 'src/*.ts', ], format: ['cjs', 'esm'], + external: ['quasar'], dts: true, splitting: true, clean: true,