ballcat-projects / vue-cropper

vue image cropper components by cropperjs.
https://ballcat-projects.github.io/vue-cropper/
MIT License
13 stars 2 forks source link

Update package.json / ts(7016) #3

Closed RedskyThirty closed 1 year ago

RedskyThirty commented 1 year ago

Can you update your package.json to prevent the following error with Typescript 5+?

Could not find a declaration file for module '@ballcat/vue-cropper'. 'c:/path-to/node_modules/@ballcat/vue-cropper/dist/index.es.js' implicitly has an 'any' type. There are types at 'c:/path-to/node_modules/@ballcat/vue-cropper/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@ballcat/vue-cropper' library may need to update its package.json or typings.ts(7016)

From this:

{
"exports": {
    ".": {
      "import": "./dist/index.es.js",
      "require": "./dist/index.umd.js"
    }
  }
}

To this:

{
"exports": {
    ".": {
      "import": {
        "types": "./dist/index.d.ts",
        "default": "./dist/index.es.js"
      },
      "require": {
        "types": "./dist/index.d.ts",
        "default": "./dist/index.umd.js"
      }
    }
  }
}
Hccake commented 1 year ago

v1.0.6 has been updated and released

RedskyThirty commented 1 year ago

Perfect, thanks a lot!