Skip to content

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

Open
@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/[email protected]/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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions