chore: initial commit

This commit is contained in:
stanig2106
2025-11-14 00:17:13 +01:00
commit 54b42e5dba
23 changed files with 2226 additions and 0 deletions

21
src/module.ts Normal file
View File

@@ -0,0 +1,21 @@
import { defineNuxtModule, addPlugin, createResolver } from '@nuxt/kit'
// Module options TypeScript interface definition
export interface ModuleOptions {
0: string
}
export default defineNuxtModule<ModuleOptions>({
meta: {
name: 'my-module',
configKey: 'myModule',
},
// Default configuration options of the Nuxt module
defaults: {},
setup(_options, _nuxt) {
const resolver = createResolver(import.meta.url)
// Do not add the extension since the `.ts` will be transpiled to `.mjs` after `npm run prepack`
addPlugin(resolver.resolve('./runtime/plugin'))
},
})

5
src/runtime/plugin.ts Normal file
View File

@@ -0,0 +1,5 @@
import { defineNuxtPlugin } from '#app'
export default defineNuxtPlugin((_nuxtApp) => {
console.log('Plugin injected by my-module!')
})

View File

@@ -0,0 +1,3 @@
{
"extends": "../../../.nuxt/tsconfig.server.json",
}