diff --git a/src/module.ts b/src/module.ts index 8e29cdc..39c7e3f 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1,4 +1,9 @@ -import { defineNuxtModule, addPlugin, createResolver } from '@nuxt/kit' +import { + addPlugin, + addImportsDir, + createResolver, + defineNuxtModule, +} from '@nuxt/kit' import { defu } from 'defu' import { name, version } from '../package.json' @@ -31,6 +36,8 @@ export default defineNuxtModule({ options, ) + addImportsDir(resolver.resolve('runtime/composables/**/*')) + addPlugin({ src: resolver.resolve('./runtime/plugins/matomo'), mode: 'client', diff --git a/src/runtime/plugins/matomo.ts b/src/runtime/plugins/matomo.ts index 1b91c56..f677280 100644 --- a/src/runtime/plugins/matomo.ts +++ b/src/runtime/plugins/matomo.ts @@ -2,13 +2,13 @@ import { defineNuxtPlugin, useHead, useLogger, + useMatomo, useRuntimeConfig, useRouter, useT3Data, useT3DataUtil, type T3SolrModel, } from '#imports' -import { useMatomo } from '../composables/useMatomo' export default defineNuxtPlugin(() => { const config = useRuntimeConfig().public.typo3Matomo