Skip to content

bug: A warning will appear when building with vite [plugin vite:resolve] Module "util" has been externalized for browser compatibility. #1379

@rxliuli

Description

@rxliuli

Expected Behavior

The build is normal, and there should be no warnings.

Current Behavior

Currently, the following warning appears when using vite for building.

[plugin:vite:resolve] [plugin vite:resolve] Module "util" has been externalized for browser compatibility, imported by "/node_modules/.pnpm/pngjs@7.0.0/node_modules/pngjs/lib/png.js". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.

Failure Information (for bugs)

It seems to be a problem with the upstream pngjs, but I will report it here as well. pngjs/pngjs#288

Steps to Reproduce

https://stackblitz.com/edit/vitejs-vite-g1cyszx3?file=src%2FApp.tsx

Screenshots

Image

Context

  • Jimp Version: ^1.6.0
  • Operating System: Mac
  • Node version: v18.20.3

Failure Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions