Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d.ts files make imports from non-existing files #2018

Closed
UfukUstali opened this issue Aug 4, 2024 · 1 comment · Fixed by numselli/portfolio#18
Closed

d.ts files make imports from non-existing files #2018

UfukUstali opened this issue Aug 4, 2024 · 1 comment · Fixed by numselli/portfolio#18
Labels
bug Something isn't working

Comments

@UfukUstali
Copy link

UfukUstali commented Aug 4, 2024

Environment

Version

2.18.0

Reproduction

not needed

Description

The build output of this package starting from 2.18.0 makes internal imports from non-existing files which causes the types to not work (maybe other things aswell have not tried out but likely not as i didn't see such imports in js or vue files)

example Button.d.ts file

from 2.18.0

// file <pnpm symlink>\@nuxt\ui\dist\runtime\components\elements\Button.vue.d.ts
import type { PropType } from 'vue';
import type { ButtonColor, ButtonSize, ButtonVariant, Strategy } from '../../types.js'; // <- does not exist
declare const config: {
    base: string;
    font: string;
    rounded: string;
    truncate: string;
.
.
.

from 2.18.3

// file <pnpm symlink>\@nuxt\ui\dist\runtime\components\elements\Button.vue.d.ts
import type { PropType } from 'vue';
import type { ButtonColor, ButtonSize, ButtonVariant, Strategy } from '../../types.js'; // <- does not exist
declare const config: {
    base: string;
    font: string;
    rounded: string;
    truncate: string;
.
.
.

from 2.17.0

// file <pnpm symlink>\@nuxt\ui\dist\runtime\components\elements\Button.vue.d.ts
import type { PropType } from 'vue';
import type { ButtonSize, ButtonVariant } from '../../types'; // <- is working
declare const _default: import("vue").DefineComponent<{
    type: {
        type: StringConstructor;
        default: string;
    };
    block: {
        type: BooleanConstructor;
        default: boolean;
    };
    label: {
        type: StringConstructor;
        default: null;
    };
    loading: {
        type: BooleanConstructor;
.
.
.

Additional context

No response

Logs

No response

Copy link
Member

benjamincanac commented Aug 4, 2024

I guess it's related to nuxt/module-builder#308. I'll push a fix to suffix all imports with /index. Thanks for the report! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants