diff --git a/packages/kit/src/components.ts b/packages/kit/src/components.ts index 79088591b0..3b8e441767 100644 --- a/packages/kit/src/components.ts +++ b/packages/kit/src/components.ts @@ -1,7 +1,6 @@ import { kebabCase, pascalCase } from 'scule' import type { Component, ComponentsDir } from '@nuxt/schema' import { useNuxt } from './context' -import { checkNuxtVersion } from './compatibility' import { logger } from './logger' import { MODE_RE } from './utils' @@ -10,9 +9,6 @@ import { MODE_RE } from './utils' */ export function addComponentsDir (dir: ComponentsDir, opts: { prepend?: boolean } = {}) { const nuxt = useNuxt() - if (!checkNuxtVersion('>=2.13', nuxt)) { - throw new Error(`\`addComponentsDir\` requires Nuxt 2.13 or higher.`) - } nuxt.options.components ||= [] dir.priority ||= 0 nuxt.hook('components:dirs', (dirs) => { dirs[opts.prepend ? 'unshift' : 'push'](dir) }) @@ -27,10 +23,6 @@ export type AddComponentOptions = { name: string, filePath: string } & Partial=2.13', nuxt)) { - throw new Error(`\`addComponent\` requires Nuxt 2.13 or higher.`) - } - nuxt.options.components ||= [] if (!opts.mode) {