Fixed #5980 - Nuxt module component autoImport in v4 rc3 doesn't work with component prefixes
parent
8f1952d1f0
commit
ff96f62e7a
|
@ -28,7 +28,7 @@ export function PrimeVueResolver(options: PrimeVueResolverOptions = {}): Compone
|
||||||
resolve: (name: string) => {
|
resolve: (name: string) => {
|
||||||
const { prefix } = options.components || {};
|
const { prefix } = options.components || {};
|
||||||
const cName = getName(name, prefix);
|
const cName = getName(name, prefix);
|
||||||
const cMeta = components.find((c) => c.name.toLocaleLowerCase() === cName.toLocaleLowerCase());
|
const cMeta = components.find((c) => c.name.toLocaleLowerCase() === cName?.toLocaleLowerCase());
|
||||||
|
|
||||||
if (cMeta) {
|
if (cMeta) {
|
||||||
return (
|
return (
|
||||||
|
@ -44,7 +44,7 @@ export function PrimeVueResolver(options: PrimeVueResolverOptions = {}): Compone
|
||||||
resolve: (name: string) => {
|
resolve: (name: string) => {
|
||||||
const { prefix } = options.directives || {};
|
const { prefix } = options.directives || {};
|
||||||
const dName = getName(name, prefix);
|
const dName = getName(name, prefix);
|
||||||
const dMeta = directives.find((d) => d.name.toLocaleLowerCase() === dName.toLocaleLowerCase());
|
const dMeta = directives.find((d) => d.name.toLocaleLowerCase() === dName?.toLocaleLowerCase());
|
||||||
|
|
||||||
if (dMeta) {
|
if (dMeta) {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue