Skip to content

Commit

Permalink
feat: auto-import composables
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdmlln committed Jan 11, 2024
1 parent fb1a5fb commit 7fff44e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -31,6 +36,8 @@ export default defineNuxtModule<ModuleOptions>({
options,
)

addImportsDir(resolver.resolve('runtime/composables/**/*'))

addPlugin({
src: resolver.resolve('./runtime/plugins/matomo'),
mode: 'client',
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/plugins/matomo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7fff44e

Please sign in to comment.