Skip to content

dts leaks absolute paths #166

@FallDownTheSystem

Description

@FallDownTheSystem

With dts enabled, the GlobalComponents interface now uses absolute paths for components, causing user paths to be leaked. Previously all paths were relative.

For reproduction I simply cloned vitesse
and ran pnpm i and pnpm dev. After that the src/components.d.ts file had changed to

// generated by unplugin-vue-components
// We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/vue-next/pull/3399

declare module 'vue' {
  export interface GlobalComponents {
    CarbonCampsite: typeof import('~icons/carbon/campsite')['default']
    CarbonDicomOverlay: typeof import('~icons/carbon/dicom-overlay')['default']
    CarbonLanguage: typeof import('~icons/carbon/language')['default']
    CarbonLogoGithub: typeof import('~icons/carbon/logo-github')['default']
    CarbonMoon: typeof import('~icons/carbon/moon')['default']
    CarbonPedestrian: typeof import('~icons/carbon/pedestrian')['default']
    CarbonSun: typeof import('~icons/carbon/sun')['default']
    CarbonWarning: typeof import('~icons/carbon/warning')['default']
    Footer: typeof import('C:/Users/MyUserName/Downloads/vitesse-main/src/components/Footer.vue')['default']
    README: typeof import('C:/Users/MyUserName/Downloads/vitesse-main/src/components/README.md')['default']
  }
}

export { }

This is on Windows 10 Version 21H2 (OS Build 19044.1263)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions