Skip to content

Commit

Permalink
chore: revert prev module installing
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jan 29, 2025
1 parent c03f243 commit 5c466b5
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/module.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import {
defineNuxtModule,
hasNuxtModule,
installModule,
} from '@nuxt/kit'
import RobotsModule from '@nuxtjs/robots'
import SitemapModule from '@nuxtjs/sitemap'
import LinkCheckerModule from 'nuxt-link-checker'
import OgImageModule from 'nuxt-og-image'
import SchemaOrgModule from 'nuxt-schema-org'
import SeoUtilsModule from 'nuxt-seo-utils'
import SiteConfigModule from 'nuxt-site-config'
import {
modules,
} from './const'
Expand All @@ -31,19 +25,16 @@ export default defineNuxtModule<ModuleOptions>({
defaults: {
enabled: true,
},
async setup(config, nuxt) {
async setup(config) {
if (!config.enabled) {
return
}

for (const module of modules) {
if (module.npm !== '@nuxtjs/seo') {
await installModule(SiteConfigModule, {}, nuxt)
await installModule(RobotsModule, {}, nuxt)
await installModule(SitemapModule, {}, nuxt)
await installModule(OgImageModule, {}, nuxt)
await installModule(SchemaOrgModule, {}, nuxt)
await installModule(LinkCheckerModule, {}, nuxt)
await installModule(SeoUtilsModule, {}, nuxt)
if (!hasNuxtModule(module.npm)) {
await installModule(module.npm, {})
}
}
}
},
Expand Down

0 comments on commit 5c466b5

Please sign in to comment.