mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 02:44:51 +00:00
18 lines
525 B
TypeScript
18 lines
525 B
TypeScript
|
import { resolve } from 'upath'
|
||
|
import { defineNuxtModule } from '@nuxt/kit'
|
||
|
|
||
|
export default defineNuxtModule({
|
||
|
name: 'meta',
|
||
|
setup (_options, nuxt) {
|
||
|
const runtimeDir = resolve(__dirname, 'runtime')
|
||
|
|
||
|
nuxt.options.build.transpile.push('@nuxt/meta', runtimeDir)
|
||
|
nuxt.options.alias['@nuxt/meta'] = resolve(runtimeDir, 'index')
|
||
|
|
||
|
nuxt.hook('app:resolve', (app) => {
|
||
|
app.plugins.push({ src: resolve(runtimeDir, 'vueuse-head') })
|
||
|
app.plugins.push({ src: resolve(runtimeDir, 'meta') })
|
||
|
})
|
||
|
}
|
||
|
})
|