Skip to content

feat: Update file-type to the latest version to avoid build errors caused by using eval in the old version. #1361

Open
@rxliuli

Description

@rxliuli

Is your feature request related to a problem? Please describe.

When building a project with Vite, this error warning always appears.
image

Describe the solution you'd like
Upgrade to file-type@19.6.0

Describe alternatives you've considered
The local testing results using pnpm overrides + patch are good.

package.json

{
  "pnpm": {
    "overrides": {
      "file-type": "^19.6.0"
    }
  }
}

@jimp/core/es/utils/image-bitmap.js

image

Additional context
Add any other context or screenshots about the feature request here.


Update, since file-type@19.6.0 is clearly esm only, and tshy does not support the feature of dynamic imports, for example, the same import has different bundles under different formats, which is very annoying...

isaacs/tshy#50

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