diff --git a/packages/core/rollup.config.mjs b/packages/core/rollup.config.mjs index 8ded828bf..14d3af25c 100644 --- a/packages/core/rollup.config.mjs +++ b/packages/core/rollup.config.mjs @@ -36,6 +36,7 @@ const ALIAS_ENTRIES = [ const files = fs.readdirSync(folderPath); const targetFile = files.find((file) => { const ext = path.extname(file); + return ['.vue', '.js'].includes(ext) && path.basename(file, ext).toLowerCase() === fName.toLowerCase(); }); diff --git a/packages/metadata/src/index.ts b/packages/metadata/src/index.ts index 191812514..a77e85b05 100644 --- a/packages/metadata/src/index.ts +++ b/packages/metadata/src/index.ts @@ -10,6 +10,7 @@ export interface MetaType { export function toMeta(arr?: any[]): MetaType[] | undefined { return arr?.map((item) => { const it = typeof item === 'string' ? { name: item } : item; + it.from ??= `primevue/${it?.name?.toLowerCase()}`; return it; diff --git a/packages/primevue/rollup.config.mjs b/packages/primevue/rollup.config.mjs index 5818886cc..550570ba6 100644 --- a/packages/primevue/rollup.config.mjs +++ b/packages/primevue/rollup.config.mjs @@ -36,6 +36,7 @@ const ALIAS_ENTRIES = [ const files = fs.readdirSync(folderPath); const targetFile = files.find((file) => { const ext = path.extname(file); + return ['.vue', '.js'].includes(ext) && path.basename(file, ext).toLowerCase() === fName.toLowerCase(); }); diff --git a/scripts/build-helper.mjs b/scripts/build-helper.mjs index 83ac1f8a8..41e3f29db 100644 --- a/scripts/build-helper.mjs +++ b/scripts/build-helper.mjs @@ -86,6 +86,7 @@ export async function renameDTSFile(dir, newName) { await renameDTSFile(fullPath, newName); } else if (entry.name.endsWith('.d.ts')) { const newFullPath = path.join(dir, `${newName}.d.ts`); + await fs.rename(fullPath, newFullPath); } }