Skip to content

Commit f94cda4

Browse files
committed
fix(kit)!: do not check compatibility for nuxt version < 2.13
1 parent 6abefd3 commit f94cda4

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

packages/kit/src/components.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { kebabCase, pascalCase } from 'scule'
22
import type { Component, ComponentsDir } from '@nuxt/schema'
33
import { useNuxt } from './context'
4-
import { checkNuxtVersion } from './compatibility'
54
import { logger } from './logger'
65
import { MODE_RE } from './utils'
76

@@ -10,9 +9,6 @@ import { MODE_RE } from './utils'
109
*/
1110
export function addComponentsDir (dir: ComponentsDir, opts: { prepend?: boolean } = {}) {
1211
const nuxt = useNuxt()
13-
if (!checkNuxtVersion('>=2.13', nuxt)) {
14-
throw new Error(`\`addComponentsDir\` requires Nuxt 2.13 or higher.`)
15-
}
1612
nuxt.options.components ||= []
1713
dir.priority ||= 0
1814
nuxt.hook('components:dirs', (dirs) => { dirs[opts.prepend ? 'unshift' : 'push'](dir) })
@@ -27,10 +23,6 @@ export type AddComponentOptions = { name: string, filePath: string } & Partial<E
2723
*/
2824
export function addComponent (opts: AddComponentOptions) {
2925
const nuxt = useNuxt()
30-
if (!checkNuxtVersion('>=2.13', nuxt)) {
31-
throw new Error(`\`addComponent\` requires Nuxt 2.13 or higher.`)
32-
}
33-
3426
nuxt.options.components ||= []
3527

3628
if (!opts.mode) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy