Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
refactor: extract component names
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 13, 2022
1 parent 2606acf commit 4cca10a
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions packages/nuxt/src/head/module.ts
Expand Up @@ -2,6 +2,8 @@ import { resolve } from 'pathe'
import { addComponent, addPlugin, defineNuxtModule } from '@nuxt/kit'
import { distDir } from '../dirs'

const components = ['Script', 'NoScript', 'Link', 'Base', 'Title', 'Meta', 'Style', 'Head', 'Html', 'Body']

export default defineNuxtModule({
meta: {
name: 'meta'
Expand All @@ -17,18 +19,7 @@ export default defineNuxtModule({

// Register components
const componentsPath = resolve(runtimeDir, 'components')
for (const componentName of [
'Script',
'NoScript',
'Link',
'Base',
'Title',
'Meta',
'Style',
'Head',
'Html',
'Body'
]) {
for (const componentName of components) {
addComponent({
name: componentName,
filePath: componentsPath,
Expand Down

0 comments on commit 4cca10a

Please sign in to comment.