diff --git a/src/module.ts b/src/module.ts new file mode 100644 index 0000000..d1d9ca5 --- /dev/null +++ b/src/module.ts @@ -0,0 +1,21 @@ +import { defineNuxtModule, createResolver, addComponent } from '@nuxt/kit' + +export interface ModuleOptions {} + +export default defineNuxtModule({ + meta: { + name: 'nuxt-twemoji', + configKey: 'nuxtTwemoji', + compatibility: { + nuxt: '^3.0.0' + } + }, + setup () { + const { resolve } = createResolver(import.meta.url) + addComponent({ + name: 'Twemoji', + global: true, + filePath: resolve('./runtime/components/Twemoji.vue') + }) + } +}) diff --git a/src/runtime/components/Twemoji.vue b/src/runtime/components/Twemoji.vue new file mode 100644 index 0000000..62eefaf --- /dev/null +++ b/src/runtime/components/Twemoji.vue @@ -0,0 +1,74 @@ + + + + + +