Skip to content

Typescript is not recognized well #597

Open
@cesxhin

Description

@cesxhin

I updated to version 1.0.1 and I'm having a problem recognizing the typescript structure of the components.

For example now in my project in the file: ".nuxt/components.d.ts"
there is a component of the module that I made but it tells me any.

Instead I have another library (also made by me) and it recognizes very well and I have not updated module-builder.

Image

UPDATED

If I specify .d.ts in the ".nuxt/components.d.ts" file instead, it works.

export const FormFields: typeof import("../node_modules/@xxxxxx/fields-loader/dist/runtime/components/formFields.vue.d.ts")['default']

Current settings package.json:

[...]
"exports": {
    ".": {
      "types": "./dist/types.d.mts",
      "import": "./dist/module.mjs"
    },
    "./components/*": "./dist/runtime/components/*",
    "./utils/*": "./dist/runtime/utils/*"
  },
  "main": "./dist/module.mjs",
  "typesVersions": {
    "*": {
      ".": [
        "./dist/types.d.mts"
      ],
      "components/*": [
        "./dist/runtime/components/*.d.ts"
      ],
      "utils/*": [
        "./dist/runtime/utils/*.d.ts"
      ]
    }
  },
  "files": [
    "dist"
  ],
[...]

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